|
From: <jd...@us...> - 2008-11-25 21:13:17
|
Revision: 6451
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6451&view=rev
Author: jdh2358
Date: 2008-11-25 21:13:09 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
added a chance for polar with usetex to remove unicode symbol
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/projections/polar.py
Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/polar.py 2008-11-25 19:56:39 UTC (rev 6450)
+++ trunk/matplotlib/lib/matplotlib/projections/polar.py 2008-11-25 21:13:09 UTC (rev 6451)
@@ -136,7 +136,10 @@
"""
def __call__(self, x, pos=None):
# \u00b0 : degree symbol
- return u"%d\u00b0" % ((x / npy.pi) * 180.0)
+ if rcParams['text.usetex']:
+ return r"$%d^\circ$" % ((x / npy.pi) * 180.0)
+ else:
+ return u"%d\u00b0" % ((x / npy.pi) * 180.0)
class RadialLocator(Locator):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-11-25 21:14:22
|
Revision: 6452
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6452&view=rev
Author: jdh2358
Date: 2008-11-25 21:14:13 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
added a chance for polar with usetex to remove unicode symbol
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/projections/polar.py
Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/polar.py 2008-11-25 21:13:09 UTC (rev 6451)
+++ trunk/matplotlib/lib/matplotlib/projections/polar.py 2008-11-25 21:14:13 UTC (rev 6452)
@@ -136,7 +136,7 @@
"""
def __call__(self, x, pos=None):
# \u00b0 : degree symbol
- if rcParams['text.usetex']:
+ if rcParams['text.usetex'] and not rcParams['text.latex.unicode']:
return r"$%d^\circ$" % ((x / npy.pi) * 180.0)
else:
return u"%d\u00b0" % ((x / npy.pi) * 180.0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-02 20:09:47
|
Revision: 6477
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6477&view=rev
Author: mdboom
Date: 2008-12-02 20:09:44 +0000 (Tue, 02 Dec 2008)
Log Message:
-----------
Round theta ticks to the nearest degree, rather than truncating.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/projections/polar.py
Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/polar.py 2008-12-02 20:08:53 UTC (rev 6476)
+++ trunk/matplotlib/lib/matplotlib/projections/polar.py 2008-12-02 20:09:44 UTC (rev 6477)
@@ -137,14 +137,14 @@
def __call__(self, x, pos=None):
# \u00b0 : degree symbol
if rcParams['text.usetex'] and not rcParams['text.latex.unicode']:
- return r"$%d^\circ$" % ((x / npy.pi) * 180.0)
+ return r"$%0.0f^\circ$" % ((x / npy.pi) * 180.0)
else:
# we use unicode, rather than mathtext with \circ, so
# that it will work correctly with any arbitrary font
# (assuming it has a degree sign), whereas $5\circ$
# will only work correctly with one of the supported
# math fonts (Computer Modern and STIX)
- return u"%d\u00b0" % ((x / npy.pi) * 180.0)
+ return u"%0.0f\u00b0" % ((x / npy.pi) * 180.0)
class RadialLocator(Locator):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-01-02 03:33:21
|
Revision: 6731
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6731&view=rev
Author: efiring
Date: 2009-01-02 03:33:17 +0000 (Fri, 02 Jan 2009)
Log Message:
-----------
Undo polar plotting bug introduced in 6106; improve r grid
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/projections/polar.py
Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/polar.py 2009-01-01 22:23:57 UTC (rev 6730)
+++ trunk/matplotlib/lib/matplotlib/projections/polar.py 2009-01-02 03:33:17 UTC (rev 6731)
@@ -57,8 +57,6 @@
def transform_path(self, path):
vertices = path.vertices
- t = vertices[:, 0:1]
- t[t != (npy.pi * 2.0)] %= (npy.pi * 2.0)
if len(vertices) == 2 and vertices[0, 0] == vertices[1, 0]:
return Path(self.transform(vertices), path.codes)
ipath = path.interpolated(self._resolution)
@@ -174,6 +172,11 @@
def refresh(self):
return self.base.refresh()
+ def view_limits(self, vmin, vmax):
+ vmin, vmax = self.base.view_limits(vmin, vmax)
+ return 0, vmax
+
+
RESOLUTION = 75
def __init__(self, *args, **kwargs):
@@ -280,6 +283,7 @@
return Circle((0.5, 0.5), 0.5)
def set_rmax(self, rmax):
+ self.viewLim.y0 = 0
self.viewLim.y1 = rmax
angle = self._r_label1_position.to_values()[4]
self._r_label1_position.clear().translate(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2010-05-10 18:20:25
|
Revision: 8303
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8303&view=rev
Author: mdboom
Date: 2010-05-10 18:20:19 +0000 (Mon, 10 May 2010)
Log Message:
-----------
Remove auto-bumping of radial tick labels on polar plots, since it breaks for log scaling.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/projections/polar.py
Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/polar.py 2010-05-10 18:06:45 UTC (rev 8302)
+++ trunk/matplotlib/lib/matplotlib/projections/polar.py 2010-05-10 18:20:19 UTC (rev 8303)
@@ -301,10 +301,6 @@
self.viewLim.y0 = 0
self.viewLim.y1 = rmax
angle = self._r_label1_position.to_values()[4]
- self._r_label1_position.clear().translate(
- angle, rmax * self._rpad)
- self._r_label2_position.clear().translate(
- angle, -rmax * self._rpad)
def get_rmax(self):
return self.viewLim.ymax
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|