Ahh the golden piece of information. Todd Miller has
> reported that idle does not seem to respect matplotlibrc.
> At this point we have no idea why. We'll try to get this
> figured out ASAP!
I found one problem. IDLE sets the HOME variable, and there is a bug
in the way matplotlib located the rc file. Basically, if HOME is set,
it expects the rc file to be there. Here is a fix.
Edit C:\Python23\Lib\site-packages\matplotlib\__init__.py and replace
the function matplotlib_fname with the following
def matplotlib_fname():
'Return the path to the rc file'
if os.environ.has_key('MATPLOTLIBRC'):
path = os.environ['MATPLOTLIBRC']
if os.path.exists(path):
fname = os.path.join(path, '.matplotlibrc')
if os.path.exists(fname):
return fname
if os.environ.has_key('HOME'):
path = os.environ['HOME']
if os.path.exists(path):
fname = os.path.join(path, '.matplotlibrc')
if os.path.exists(fname):
return fname
path = get_data_path() # guaranteed to exist or raise
fname = os.path.join(path, '.matplotlibrc')
if not os.path.exists(fname):
print >> sys.stderr, 'Could not find .matplotlibrc; using defaults'
return fname
I tested this on windows with idle. Idle now respects matplotlibrc
and loads TkAgg. However, at least on my system, there is still some
idle bug because the Tk window launches and then freezes without
displaying the figure I suspect Todd, the TkAgg author, will be
looking at this soon. [Todd, I had this problem with or without
window_focus set in my test].
Sorry for the troubles,
JDH