SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] Building documentation and matplotlibrc

From: Ben G. <bg...@gm...> - 2010年12月09日 22:04:50
On 2010年12月09日 16:44:37 -0500, Ben Gamari <bg...@gm...> wrote:
> rcdefaults()'s implementation appears to implement the latter, updating
> rcParams from rcParamsDefault in rcsetup.py, which appears to describe
> the factory default values. Perhaps we should
> rcParamsDefault.update(rcParams) after loading matplotlibrc?
> 
As expected, doing the update of rcParamsDefault proposed above (patch
below) allows the examples.download setting to persist throughout the
documentation build. It seems like either the documentation build
process or rcParamsDefault has been badly broken for a very long
time. Is rcParamsDefault really supposed to be the factory defaults or
is this just a bug? If the former, we will need to introduce a variant
of matplotlib.rcdefaults() to reset the configuration to that specified
in matplotlibrc.
- Ben
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -764,13 +772,13 @@ Please do not ask for support with these customizations active.
 # this is the instance used by the matplotlib classes
 rcParams = rc_params()
-
-rcParamsDefault = RcParams([ (key, default) for key, (default, converter) in \
- defaultParams.iteritems() ])
-
 rcParams['ps.usedistiller'] = checkdep_ps_distiller(rcParams['ps.usedistiller'])
 rcParams['text.usetex'] = checkdep_usetex(rcParams['text.usetex'])
+rcParamsDefault = RcParams([ (key, default) for key, (default, converter) in \
+ defaultParams.iteritems() ])
+rcParamsDefault.update(rcParams)
+
 def rc(group, **kwargs):
 """
 Set the current rc params. Group is the grouping for the rc, eg.

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /