## matplotlib-users

 [Matplotlib-users] polar plot: problem with negative angles From: Magnus Benjes - 2009-05-17 06:52:33 Attachments: Message as HTML ```Hello, in version 0.98.5.2 the polar plot still has a problem with negativ angles. The polarplot is drawing a circle when the angle changes from negativ to positiv (e.g. from -0.01 to +0.01). But in "What new in 0.98.4" (http://matplotlib.sourceforge.net/users/whats_new.html) I can read: "Fix polar interpolation to handle negative values of theta - MGD" Is there a workaround for this problem? Regards Magnus ******************** import numpy as np import matplotlib import matplotlib.pyplot as plt x = np.linspace(-np.pi/3, np.pi/3, 100) y = np.sin((10*x)**2)+2 plt.subplot(111, polar=True) plt.plot(x,y) plt.title(matplotlib.__version__) plt.show() ```
 Re: [Matplotlib-users] polar plot: problem with negative angles From: Eric Firing - 2009-05-17 17:20:14 ```Magnus Benjes wrote: > Hello, > in version 0.98.5.2 the polar plot still has a problem with negativ angles. > The polarplot is drawing a circle when the angle changes from negativ to > positiv (e.g. from -0.01 to +0.01). Your example works fine with svn. I don't recall whether the problem was fixed before the last release. I think it was. > > But in "What new in 0.98.4" > (http://matplotlib.sourceforge.net/users/whats_new.html) I can read: > "Fix polar interpolation to handle negative values of theta - MGD" I think that commit actually introduced the problem. > > Is there a workaround for this problem? A release appears to be imminent--it was tagged hours ago. Can you update when it appears? Eric > > Regards > Magnus > > ******************** > import numpy as np > import matplotlib > import matplotlib.pyplot as plt > > x = np.linspace(-np.pi/3, np.pi/3, 100) > y = np.sin((10*x)**2)+2 > > plt.subplot(111, polar=True) > plt.plot(x,y) > plt.title(matplotlib.__version__) > plt.show() > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ```
 Re: [Matplotlib-users] polar plot: problem with negative angles From: Magnus Benjes - 2009-05-17 18:51:56 ```> Magnus Benjes wrote: >> Hello, >> in version 0.98.5.2 the polar plot still has a problem with negativ >> angles. >> The polarplot is drawing a circle when the angle changes from negativ to >> positiv (e.g. from -0.01 to +0.01). > > Your example works fine with svn. I don't recall whether the problem was > fixed before the last release. I think it was. > Thank you for the hint, in version 0.98.6 the polar plot has no problems with negativ angles any more. But now there are only gridlines in radial direction and the gridlines in angular direction are missing. Magnus ```
 Re: [Matplotlib-users] polar plot: problem with negative angles From: Jae-Joon Lee - 2009-05-18 19:49:40 ```The grid line will reappear if you set high enough resolution. plt.subplot(111, polar=True, resolution=100) This should be filed as a bug, though. I guess the current default for resolution is 1. I think this was to enable to draw a straight line in polar projection. However, my guess is that it has a side-effect that a angular gridline became a 0-length line connecting two identical points. -JJ On Sun, May 17, 2009 at 2:51 PM, Magnus Benjes wrote: >> Magnus Benjes wrote: >>> Hello, >>> in version 0.98.5.2 the polar plot still has a problem with negativ >>> angles. >>> The polarplot is drawing a circle when the angle changes from negativ to >>> positiv (e.g. from -0.01 to +0.01). >> >> Your example works fine with svn.  I don't recall whether the problem was >> fixed before the last release.  I think it was. >> > Thank you for the hint, in version 0.98.6 the polar plot has no problems > with negativ angles any more. > But now there are only gridlines in radial direction and the gridlines in > angular direction are missing. > > Magnus > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ```