Revision: 7916
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7916&view=rev
Author: mdboom
Date: 2009-11-02 18:54:29 +0000 (Mon, 02 Nov 2009)
Log Message:
-----------
[2890345] pylab.thetagrids() does not accept fmt
Modified Paths:
--------------
branches/v0_99_maint/lib/matplotlib/projections/polar.py
Modified: branches/v0_99_maint/lib/matplotlib/projections/polar.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/projections/polar.py 2009-11-02
18:31:42 UTC (rev 7915)
+++ branches/v0_99_maint/lib/matplotlib/projections/polar.py 2009-11-02
18:54:29 UTC (rev 7916)
@@ -11,7 +11,7 @@
from matplotlib import cbook
from matplotlib.patches import Circle
from matplotlib.path import Path
-from matplotlib.ticker import Formatter, Locator
+from matplotlib.ticker import Formatter, Locator, FormatStrFormatter
from matplotlib.transforms import Affine2D, Affine2DBase, Bbox, \
BboxTransformTo, IdentityTransform, Transform, TransformWrapper
import matplotlib.spines as mspines
@@ -317,7 +317,7 @@
set_rscale = Axes.set_yscale
set_rticks = Axes.set_yticks
- def set_thetagrids(self, angles, labels=None, frac=None,
+ def set_thetagrids(self, angles, labels=None, frac=None, fmt=None,
**kwargs):
"""
Set the angles at which to place the theta grids (these
@@ -347,6 +347,8 @@
self.set_xticks(angles * (npy.pi / 180.0))
if labels is not None:
self.set_xticklabels(labels)
+ elif fmt is not None:
+ self.xaxis.set_major_formatter(FormatStrFormatter(fmt))
if frac is not None:
self._theta_label1_position.clear().translate(0.0, frac)
self._theta_label2_position.clear().translate(0.0, 1.0 / frac)
@@ -355,7 +357,8 @@
return self.xaxis.get_ticklines(), self.xaxis.get_ticklabels()
set_thetagrids.__doc__ = cbook.dedent(set_thetagrids.__doc__) % kwdocd
- def set_rgrids(self, radii, labels=None, angle=None, rpad=None, **kwargs):
+ def set_rgrids(self, radii, labels=None, angle=None, rpad=None, fmt=None,
+ **kwargs):
"""
Set the radial locations and labels of the *r* grids.
@@ -388,6 +391,8 @@
self.set_yticks(radii)
if labels is not None:
self.set_yticklabels(labels)
+ elif fmt is not None:
+ self.yaxis.set_major_formatter(FormatStrFormatter(fmt))
if angle is None:
angle = self._r_label1_position.to_values()[4]
if rpad is not None:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins