From: Jouni K. S. <jk...@ik...> - 2010-12-09 21:55:38
|
Ben Gamari <bg...@gm...> writes: > It seems that matplotlib's sphinx extension calls > matplotlib.rcdefaults() after rendering each figure, thus resetting > examples.download to True (as set in rcsetup.py). Right, and it sets figure.figsize after it. I guess you will want to set examples.download in the same function. > The documentation claims that this function will "Restore the default rc > params - the ones that were created at matplotlib load time." > 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? I think you're better off modifying the sphinx extension. rcdefaults has a useful purpose, and the extension is trying to use it for that purpose: to avoid having the user's configuration mess up the documentation. If you were to update rcParamsDefault with the matplotlibrc parameters, you might accidentally change the example output. -- Jouni K. Seppänen http://www.iki.fi/jks |