On Thu, Feb 5, 2009 at 2:28 PM, William Stein <[email protected]> wrote:
> On Fri, Jan 30, 2009 at 10:52 AM, Jason Grout
> <[email protected]> wrote:
>>
>> Jason Grout wrote:
>>>
>>> Well, there is something to be said for what you said. We ship our own
>>> version of matplotlib, which mostly likely is different than the system
>>> install. That means that their perfectly good default matplotlibrc file
>>> might cause deprecation warnings for us. For that reason, I think we
>>> should still set the MATPLOTLIBRC environment variable to point to a
>>> location within $DOT_SAGE.
>>>
>>> For that reason, how about yet another proposal:
>>>
>>> Add a warnings handler which traps the Matplotlib deprecation
>>> warning. This handler will compare the matplotlibrc with the one that
>>> was distributed in the last release (maybe by checking a hash value).
>>> If it is identical (i.e., the user hasn't modified the matplotlibrc),
>>> then *delete* the matplotlibrc. This is a
>>> bit tricky, since the sage default matplotlibrc is not under version
>>> control (it's in $SAGE_ROOT), so we don't know what older copies looked
>>> like. (hehe...yet another reason to really like mabshoff for the
>>> library of old builds). If the file is not identical to the current
>>> sage default matplotlibrc, then throw a warning with a helpful error
>>> message about updating the matplotlibrc (and where to find the file).
>>
>>
>> I should note that the file we would be deleting lives in $DOT_SAGE, and
>> so should not affect the user's other usage of matplotlib outside of Sage.
>
> I'm just going to make a call on this, so that the new matplotlib gets into
> Sage ASAP. Jason's original proposal is:
>
> "So here's a proposal: Should Sage stop distributing a custom
> matplotlibrc, and ignore matplotlibrc files that already exist in the
> $DOT_SAGE directories?"
>
> After the above discussion, and responses to my concerns about this, I
> say we do exactly what Jason originally proposed.
Just to be clear, since Jason wasn't. We should stop distributing a
custom matplotlibrc, and ignore the $DOT_SAGE/matplotlibrc that we
ship, by not setting that environment variable when Sage starts up.
To implement this is as simple as deleting this code from
SAGE_ROOT/local/bin/sage-sage and anything in there that called it:
matplotlib_setup() {
MATPLOTLIBRC="$DOT_SAGE/" && export MATPLOTLIBRC
if [ ! -f "$MATPLOTLIBRC/matplotlibrc" ]; then
mkdir -p "$DOT_SAGE"
cp "$SAGE_ROOT/matplotlibrc" "$DOT_SAGE/"
fi
}
If users want to have custom matplotlibrc's they can always set
MATPLOTLIBRC however they want.
-- William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---