|
From: <lee...@us...> - 2010-01-11 19:55:25
|
Revision: 8079
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8079&view=rev
Author: leejjoon
Date: 2010-01-11 19:55:19 +0000 (Mon, 11 Jan 2010)
Log Message:
-----------
new 'bbox-forced' option for Axes.adjustable
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2010-01-11 19:54:58 UTC (rev 8078)
+++ trunk/matplotlib/CHANGELOG 2010-01-11 19:55:19 UTC (rev 8079)
@@ -1,3 +1,6 @@
+2009-01-11 adjustable of Axes can be "box-forced" which allow
+ sharing axes. -JJL
+
2009-01-11 Add add_click and pop_click methods in
BlockingContourLabeler. -JJL
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2010-01-11 19:54:58 UTC (rev 8078)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2010-01-11 19:55:19 UTC (rev 8079)
@@ -349,7 +349,7 @@
================ =========================================
Keyword Description
================ =========================================
- *adjustable* [ 'box' | 'datalim' ]
+ *adjustable* [ 'box' | 'datalim' | 'box-forced']
*alpha* float: the alpha transparency
*anchor* [ 'C', 'SW', 'S', 'SE', 'E', 'NE', 'N',
'NW', 'W' ]
@@ -947,13 +947,18 @@
*adjustable*
- ========= ============================
- value description
- ========= ============================
- 'box' change physical size of axes
- 'datalim' change xlim or ylim
- ========= ============================
+ ============ =====================================
+ value description
+ ============ =====================================
+ 'box' change physical size of axes
+ 'datalim' change xlim or ylim
+ 'box-forced' same as 'box', but axes can be shared
+ ============ =====================================
+ 'box' does not allow axes sharing, as this can cause
+ unintended side effect. For cases when sharing axes is
+ fine, use 'box-forced'.
+
*anchor*
===== =====================
@@ -984,9 +989,9 @@
def set_adjustable(self, adjustable):
"""
- ACCEPTS: [ 'box' | 'datalim' ]
+ ACCEPTS: [ 'box' | 'datalim' | 'box-forced']
"""
- if adjustable in ('box', 'datalim'):
+ if adjustable in ('box', 'datalim', 'box-forced'):
if self in self._shared_x_axes or self in self._shared_y_axes:
if adjustable == 'box':
raise ValueError(
@@ -1098,7 +1103,7 @@
figW,figH = self.get_figure().get_size_inches()
fig_aspect = figH/figW
- if self._adjustable == 'box':
+ if self._adjustable in ['box', 'box-forced']:
if aspect_scale_mode == "log":
box_aspect = A * self.get_data_ratio_log()
else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|