From: <md...@us...> - 2009-01-29 22:46:08
|
Revision: 6854 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6854&view=rev Author: mdboom Date: 2009-01-29 21:36:54 +0000 (Thu, 29 Jan 2009) Log Message: ----------- Document the 'resolution' kwarg to polar plots. Modified Paths: -------------- branches/v0_98_5_maint/CHANGELOG branches/v0_98_5_maint/lib/matplotlib/projections/polar.py branches/v0_98_5_maint/lib/matplotlib/pyplot.py Modified: branches/v0_98_5_maint/CHANGELOG =================================================================== --- branches/v0_98_5_maint/CHANGELOG 2009-01-29 21:01:45 UTC (rev 6853) +++ branches/v0_98_5_maint/CHANGELOG 2009-01-29 21:36:54 UTC (rev 6854) @@ -1,3 +1,6 @@ +2009-01-29 Document 'resolution' kwarg for polar plots. Support it + when using pyplot.polar, not just Figure.add_axes. - MGD + 2009-01-26 Make curves and NaNs play nice together - MGD 2009-01-19 Fix bug in quiver argument handling. - EF Modified: branches/v0_98_5_maint/lib/matplotlib/projections/polar.py =================================================================== --- branches/v0_98_5_maint/lib/matplotlib/projections/polar.py 2009-01-29 21:01:45 UTC (rev 6853) +++ branches/v0_98_5_maint/lib/matplotlib/projections/polar.py 2009-01-29 21:36:54 UTC (rev 6854) @@ -182,10 +182,18 @@ def __init__(self, *args, **kwargs): """ Create a new Polar Axes for a polar plot. + + The following optional kwargs are supported: + + - *resolution*: The number of points of interpolation between + each pair of data points. Set to 1 to disable + interpolation. """ self._rpad = 0.05 - self.resolution = kwargs.pop('resolution', self.RESOLUTION) + self.resolution = kwargs.pop('resolution', None) + if self.resolution is None: + self.resolution = self.RESOLUTION Axes.__init__(self, *args, **kwargs) self.set_aspect('equal', adjustable='box', anchor='C') self.cla() Modified: branches/v0_98_5_maint/lib/matplotlib/pyplot.py =================================================================== --- branches/v0_98_5_maint/lib/matplotlib/pyplot.py 2009-01-29 21:01:45 UTC (rev 6853) +++ branches/v0_98_5_maint/lib/matplotlib/pyplot.py 2009-01-29 21:36:54 UTC (rev 6854) @@ -1406,8 +1406,13 @@ Make a polar plot. Multiple *theta*, *r* arguments are supported, with format strings, as in :func:`~matplotlib.pyplot.plot`. + + An optional kwarg *resolution* sets the number of vertices to + interpolate between each pair of points. Set to 1 to disable + interpolation. """ - ax = gca(polar=True) + resolution = kwargs.pop('resolution', None) + ax = gca(polar=True, resolution=resolution) ret = ax.plot(*args, **kwargs) draw_if_interactive() return ret This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |