Quantcast

Difference between 2 lines and adaptative grid

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Difference between 2 lines and adaptative grid

Nicolas Girard
Hi all,

I apologize for beeing slightly off-topic with this question, but I couldn't
think about a better place to ask :-/

Consider two vectors x1 and y1. Using matplotlib, plot(x1,y1) will display the
line joining all points whose coordinates are (x1(i),y1(i))
Now, consider another couple of vectors x2 and y2.
Using plot(x1,y1,x2,y2) we are shown the 2 lines corresponding to (x1,y1) and
(x2,y2), and we can compare these two lines with the naked eye

My question is, how to do this quantitatively ? Is there a way of calculating
the difference between the two sets of points, and then plot this difference,
using matplotlib ? I mean, if the data was generated using a fixed grid, it
would be enough to plot (y2-y1) but with an adaptative grid, x1 and x2
differ. Do you know about a quick & dirty way to achieve this ?

Thanks in advance,
cheers,
Nicolas



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Difference between 2 lines and adaptative grid

albert_
Hi,

you can look in the direction of polyfit, polyval function to do what do
you want.

Regards,

    N


Nicolas Girard wrote:

>Hi all,
>
>I apologize for beeing slightly off-topic with this question, but I couldn't
>think about a better place to ask :-/
>
>Consider two vectors x1 and y1. Using matplotlib, plot(x1,y1) will display the
>line joining all points whose coordinates are (x1(i),y1(i))
>Now, consider another couple of vectors x2 and y2.
>Using plot(x1,y1,x2,y2) we are shown the 2 lines corresponding to (x1,y1) and
>(x2,y2), and we can compare these two lines with the naked eye
>
>My question is, how to do this quantitatively ? Is there a way of calculating
>the difference between the two sets of points, and then plot this difference,
>using matplotlib ? I mean, if the data was generated using a fixed grid, it
>would be enough to plot (y2-y1) but with an adaptative grid, x1 and x2
>differ. Do you know about a quick & dirty way to achieve this ?
>
>Thanks in advance,
>cheers,
>Nicolas
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Loading...