On Fri, Jul 18, 2008 at 9:49 AM, Gael Varoquaux
<[EMAIL PROTECTED]> wrote:

> Hum, maybe I am not understanding properly what you mean here. It acts on
> matplotlib only when it is passed the -pylab argument, AFAIK. Thus if you

OK, at least I understand the issue now a bit better, thanks for
explaining it.  But I am not entirely comfortable with the solution.
In general we have avoided trying to magically get stuff right in
favor of making sure people are properly configured.  This poses
inconveniences to new users but at least allows people who are clear
in their intentions to get what they want.  I worry by forcing the
backend to wx or wxagg just because wx has already been imported we
are making too many assumptions (someone may want to use matplotlib
pyplot in a wx app to generate pure image figures with the ps backend,
etc...).  We also now support custom external backends with the
module://some_backend syntax so in principle one could be using a
custom wx backend with a custom renderer outside of mpl.

I'm sure there is a way to get what you want, but this may not be it.
Basically, you want to support users who are using ipython -wthread
but not -pylab who later import pylab with a misconfigured rc.  Is
this really desirable?  Certainly you would want to trap this or warn
or something so they don't get strange segfaults or other hard to
diagnose errors, but automagically switching the backend in mpl may be
too helpful in the way that microsoft windows is occassionally too
helpful.

What about checking to see if your ipython module is in sys.modules
when pyplot is imported, checking the backend, and then importing it,
checking for wthread etc, issuing a severe warning with known
misconfigurations, eg gtkagg, with instructions on how to fix is (eg
"your matplotlibrc file is here and the backend needs to be set to
such-and-such...")?

JDH

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to