|
From: <jd...@us...> - 2011-01-05 15:59:40
|
Revision: 8889
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8889&view=rev
Author: jdh2358
Date: 2011-01-05 15:59:33 +0000 (Wed, 05 Jan 2011)
Log Message:
-----------
fix rc file defaults issue for docs; python 2.4 compliance for formlayout
Modified Paths:
--------------
branches/v1_0_maint/doc/matplotlibrc
branches/v1_0_maint/lib/matplotlib/__init__.py
branches/v1_0_maint/lib/matplotlib/backends/qt4_editor/formlayout.py
Modified: branches/v1_0_maint/doc/matplotlibrc
===================================================================
--- branches/v1_0_maint/doc/matplotlibrc 2011-01-05 15:43:30 UTC (rev 8888)
+++ branches/v1_0_maint/doc/matplotlibrc 2011-01-05 15:59:33 UTC (rev 8889)
@@ -232,7 +232,7 @@
### FIGURE
# See http://matplotlib.sourceforge.net/matplotlib.figure.html#Figure
-figure.figsize : 6, 4 # figure size in inches
+figure.figsize : 5.5, 4.5 # figure size in inches
#figure.dpi : 80 # figure dots per inch
#figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray
#figure.edgecolor : white # figure edgecolor
Modified: branches/v1_0_maint/lib/matplotlib/__init__.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/__init__.py 2011-01-05 15:43:30 UTC (rev 8888)
+++ branches/v1_0_maint/lib/matplotlib/__init__.py 2011-01-05 15:59:33 UTC (rev 8889)
@@ -762,6 +762,7 @@
# this is the instance used by the matplotlib classes
rcParams = rc_params()
+rcParamsOrig = rcParams.copy()
rcParamsDefault = RcParams([ (key, default) for key, (default, converter) in \
defaultParams.iteritems() ])
@@ -843,11 +844,19 @@
def rcdefaults():
"""
- Restore the default rc params - the ones that were created at
- matplotlib load time.
+ Restore the default rc params - these are not the params loaded by
+ the rc file, but mpl's internal params. See rc_file_defaults for
+ reloading the default params from the rc file
"""
rcParams.update(rcParamsDefault)
+def rc_file_defaults():
+ """
+ Restore the default rc params from the original matplotlib rc that
+ was loaded
+ """
+ rcParams.update(rcParamsOrig)
+
_use_error_msg = """ This call to matplotlib.use() has no effect
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
Modified: branches/v1_0_maint/lib/matplotlib/backends/qt4_editor/formlayout.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/backends/qt4_editor/formlayout.py 2011-01-05 15:43:30 UTC (rev 8888)
+++ branches/v1_0_maint/lib/matplotlib/backends/qt4_editor/formlayout.py 2011-01-05 15:59:33 UTC (rev 8889)
@@ -272,7 +272,11 @@
field.setCurrentIndex(selindex)
elif isinstance(value, bool):
field = QCheckBox(self)
- field.setCheckState(Qt.Checked if value else Qt.Unchecked)
+ if value:
+ field.setCheckState(Qt.Checked)
+ else:
+ field.setCheckedState(Qt.Unchecked)
+
elif isinstance(value, float):
field = QLineEdit(repr(value), self)
elif isinstance(value, int):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|