I don't see any elegant way to do that.

The easiest way I can think of is to use a derived line2d class.
Something like below will work. Others may have better ideas.


import matplotlib.lines

class Line2DNoInterpolation(matplotlib.lines.Line2D):

    def recache(self):
        matplotlib.lines.Line2D.recache(self)
        self._transformed_path.get_transformed_path_and_affine = \
               self._transformed_path.get_transformed_points_and_affine



ax = subplot(111, projection="polar")

r = np.arange(0, 1.0, 0.1)
theta = 2*np.pi*r

p2 = Line2DNoInterpolation(theta, r, color='r', lw=1)
ax.add_line(p2)


-JJ


On Thu, Jan 29, 2009 at 12:20 AM, jamesf0 <jame...@utas.edu.au> wrote:
>
> Hi,
>
> Im having some trouble with this "seemingly" simple task of plotting
> straight lines/fitted curves on a polar plot.
>
> I am trying to create a plot that resembles the layout of the chart seen
> below:
>
> http://www.nabble.com/file/p21721073/brisbane.png
>
>
>
> So far I have only been able to plot data like so:
>
> http://www.nabble.com/file/p21721073/AzvAlt.png
>
>
> The blue line should be similar to the bottom line of the first example
> plot. The line would ultimately be formed by fitting a straight line/curve
> through the points, instead of the way matplotlib is plotting.
>
> I am plotting tuples of values (az and alt), and plotting using:
>
>
> ax.plot(az, alt, 'b')
> --
> View this message in context: 
> http://www.nabble.com/How-to-plot-straight-lines-on-polar-plots-tp21721073p21721073.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

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

Reply via email to