|
From: <md...@us...> - 2010-05-10 18:06:51
|
Revision: 8302
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8302&view=rev
Author: mdboom
Date: 2010-05-10 18:06:45 +0000 (Mon, 10 May 2010)
Log Message:
-----------
Fix aspect ratio calculation for polar plots.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2010-05-09 02:59:29 UTC (rev 8301)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2010-05-10 18:06:45 UTC (rev 8302)
@@ -1084,20 +1084,23 @@
aspect = self.get_aspect()
- xscale, yscale = self.get_xscale(), self.get_yscale()
- if xscale == "linear" and yscale == "linear":
+ if self.name != 'polar':
+ xscale, yscale = self.get_xscale(), self.get_yscale()
+ if xscale == "linear" and yscale == "linear":
+ aspect_scale_mode = "linear"
+ elif xscale == "log" and yscale == "log":
+ aspect_scale_mode = "log"
+ elif (xscale == "linear" and yscale == "log") or \
+ (xscale == "log" and yscale == "linear"):
+ if aspect is not "auto":
+ warnings.warn(
+ 'aspect is not supported for Axes with xscale=%s, yscale=%s' \
+ % (xscale, yscale))
+ aspect = "auto"
+ else: # some custom projections have their own scales.
+ pass
+ else:
aspect_scale_mode = "linear"
- elif xscale == "log" and yscale == "log":
- aspect_scale_mode = "log"
- elif (xscale == "linear" and yscale == "log") or \
- (xscale == "log" and yscale == "linear"):
- if aspect is not "auto":
- warnings.warn(
- 'aspect is not supported for Axes with xscale=%s, yscale=%s' \
- % (xscale, yscale))
- aspect = "auto"
- else: # some custom projections have their own scales.
- pass
if aspect == 'auto':
self.set_position( position , which='active')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|