One more thought along this line. Perhaps it's possible for
> matplotlib to inspect whether or not any of the supported
> gui's has already been imported and make that the
> default. It seems like a sensible rule to me. If none are
> found, then all the other mechanisms apply.
I've given a little thought to this and it is certainly possible. In
the backend selection code we can detect the case when the backend has
not been *explicity* set by either -d or matplotlib.use. In the case
that we are using the default from matplotlib rc, and the default is a
GUI, we could do two things to help prevent mistakes
* make sure no conflicting gui is loaded in sys.modules. If another
is, go with that (issue a warning)
* if no other is loaded, try and load the required GUI lib in a
try/except block. If the load fails, look for an alternative and
use that instead (issue a warning)
I don't see a major problem with this approach. I want to avoid the
microsoft approach of doing too much behind the scenes to try and
accommodate the careless user, since this often runs afoul of the
power user, and often leads to situations that are difficult to debug.
I think if we issue warnings we can at least make clear what is
happening which should satisfy both potential problems.
Any forseeable problems with this approach?