Hi John,

On Wed, Jan 5, 2011 at 15:04, John Hunter <jdh2...@gmail.com> wrote:
> I agree the current behavior needs to be improved.  I'm testing a change now
> which utilizes two functions, now properly documented, and removing the hack
> in the plot_directive since the file defaults will be preserved.  This keeps
> the current behavior, since rcdefaults is unchanged, but fixes the doc
> string, and introduces a new function with the desired behavior.

thanks for working on it!

> Index: doc/matplotlibrc
> ===================================================================
> --- doc/matplotlibrc    (revision 8886)
> +++ doc/matplotlibrc    (working copy)
> @@ -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
> Index: lib/matplotlib/__init__.py
> ===================================================================
> --- lib/matplotlib/__init__.py  (revision 8886)
> +++ lib/matplotlib/__init__.py  (working copy)
> @@ -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,

I take the patch is not complete, right? because naively applying it
in a just-untarred source code + configuring doc/matplotlibrc don't
work (ie keeps trying accessing the net)

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to