All,

While looking over the polar plot code I came across the following issue:  When 
plotting something like 'polar( [2*pi/180, 358*pi/180], [2.0, 1.0] )' the 
plotted line will actually wrap around the origin of the plot before reaching 
its destination.  Initially I thought that this was correct behavior.  The line 
numerically passed through all angles between 2 and 358 degrees in a linear 
fashion.  However after consulting several colleagues and text books I believe 
that the behavior is actually wrong.

It is my understanding that for polar plots there is no linear mapping of the 
axes as it is currently implemented.  Rather for a simple two-point line 
defined in polar coordinates, the line should essentially take the direct 
route.  This is highlighted by the two-point equation of a line for polar plots:

r = ( r1*r2*sin(t2-t1) ) / ( (r1*sin(t-t1)) - (r2*sin(t-t2)) )

If you were to plug in the two points given above, then increment theta (t) 
from 2 degrees to 358 degrees, then convert to Cartesian cords, and plot the 
results, you will get the correct line that directly crosses the zero degree 
line and not one that wraps around the origin.

Is the polar plot function implemented this way on purpose?  Which way should 
it really be implemented?

Thanks,
--James Evans


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to