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
diff --git 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() ])
def rc(group, **kwargs):
Set the current rc params. Group is the grouping for the rc, eg.
With this patch we can indeed finally use the sampledata local dir -
thanks Ben for that!! anyhow, it seems to be quite a radical change,
that might have a bit of impact on what the users can experience, so
I'd like to hear from mpl devels what's the feelings about that.
Anyhow, please note that examples.directory RC param, must not
contains apex (') at the beginning/end of the value, else it would
fail; the example in matplotlibrc.template seems to suggests it's
#examples.directory : '' # directory to look in if download is false
else you would get:
IOError: [Errno 2] No such file or directory:
it should be made it clearer (or make the get_sample_data() smarter) about that.
On Thu, Dec 9, 2010 at 23:04, Ben Gamari <bgamari@...149...> wrote:
On Thu, 09 Dec 2010 16:44:37 -0500, Ben Gamari <bgamari@...149...> wrote:
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi