>>>>> "Darren" == Darren Dale <dd...@co...> writes:
Darren> I am seeing some strange behavior during IPython and
Darren> vanilla Python interactive sessions. My .matplotlibrc is
Darren> not being respected. I have tried making changes to the
Darren> copy in my home diretory and the one in
Darren> /usr/share/matplotlib. If I run the commands below or do
Darren> an execfile('/home/darren/test.py') from an interactive
Darren> session, .matplotlibrc is not read. If I run the script
Darren> from the console, .matplotlibrc is read.
Darren> I'm on gentoo with either 0.63.0 or the current cvs,
Darren> python 2.3.3. Has anyboody else seen this?
Darren> from matplotlib.matlab import * a=[1,10,100,1000,10000]
Darren> figure(1) loglog(a,a) figure(2) plot(a,a) show()
Changes to rc made after you have started an interactive session would
not be expected to have an effect -- the rc file is parsed when any
matplotlib module is imported and not parsed again. If you make some
obvious change to the rc file in your home dir, say
figure.facecolor : g # figure facecolor; 0.75 is scalar gray
and *restart* ipython, do the changes take effect?
Note that you don't need to execfile with ipython, since that is what
the ipython 'run' command is for, and run does some smart things
before exec-ing your file, namely turning interactive off for the
duration of the run, which is more efficient.
There has been some interest in a loadrc command, which would be used
to load a specified rc file from the command line or script. Should
be easy to add, and it is on the todo list.
Note that matplotlib in CVS has a new verbose setting which is
described at the bottom of the rc file. By changing the verbose
setting to helpful, it will give you diagnostic information when you
run, including which rc file is loaded. If you continue having
trouble with this, I suggest grabbing the latest from CVS and try
running with verbose : helpful.
JDH
|