Closed neggert closed 12 years ago
Yes, please attach your rc file. I don't mind to stick it in.
Ok, it is on a master branch.
I'm still getting the same errors. Seems like it's still picking up the matplotlibrc in my home directory.
Nic, I don't know much the matplotlib, but I did add rc file into install/lib/python-2.6/site-packages/matplotlib/mpl-data area. Please check. We need to find a way to tell matplotlib to pick up the one from our install area instead of HOME. I bet that it does reverse, i.e. it prefer the one from home area.
I'll see if I can figure out how to tell matplotlib how to use a different rc file.
On Wed, Apr 18, 2012 at 2:13 PM, Valentin Kuznetsov reply@reply.github.com wrote:
Nic, I don't know much the matplotlib, but I did add rc file into install/lib/python-2.6/site-packages/matplotlib/mpl-data area. Please check. We need to find a way to tell matplotlib to pick up the one from our install area instead of HOME. I bet that it does reverse, i.e. it prefer the one from home area.
Reply to this email directly or view it on GitHub: https://github.com/vkuznet/cmssh/issues/13#issuecomment-5204997
It looks like this is not possible. See http://matplotlib.sourceforge.net/users/customizing.html
Wrong statement :), it is possible, you need to properly set MATPLOTLIBRC, add to your soft/setup.sh the following line (I'll include it in cmssh installer)
export MATPLOTLIBRC=$CMSSH_ROOT/install/lib/python2.6/site-packages/matplotlib/mpl-data
Then cmssh will pick up proper rc file. I just verified this as following
cms-sh|1> matplotlib.matplotlib_fname() Out[1]: '/Users/vk/CMS/test_cmssh2/soft/install/lib/python2.6/site-packages/matplotlib/mpl-data/matplotlibrc'
But the one you gave me the file which has some problem, could you please investigate and create proper rc file. Here is a mesage I got
Bad key "text.markup" on line 162 in /Users/vk/CMS/test_cmssh2/soft/install/lib/python2.6/site-packages/matplotlib/mpl-data/matplotlibrc. You probably need to get an updated matplotlibrc file from http://matplotlib.sf.net/_static/matplotlibrc or from the matplotlib source distribution /Users/vk/CMS/test_cmssh2/soft/CMSSW/osx106_amd64_gcc421/external/py2-matplotlib/1.0.1-cms3/lib/python2.6/site-packages/matplotlib/init.py:734: UserWarning: Bad val "mathpazo" on line #191 "mathtext.default : mathpazo # The default font to use for math. " in file "/Users/vk/CMS/test_cmssh2/soft/install/lib/python2.6/site-packages/matplotlib/mpl-data/matplotlibrc" Unrecognized default string "mathpazo": valid strings are ['bf', 'bb', 'default', 'tt', 'circled', 'frak', 'it', 'regular', 'cal', 'rm', 'sf', 'scr'] "%s"\n\t%s' % (val, cnt, line, fname, msg))
I disabled text.markup and used default font for mathtext.default option, see d8f90a0. The rc file should be very conservative and work across multiple version of matplotlib (the one which is installed by default).
Ah, yes. Sorry about that. That's the default CMS font for math, but it's probably not installed on all systems. Using default for math text.default should solve the problem.
On Wed, Apr 18, 2012 at 3:57 PM, Valentin Kuznetsov reply@reply.github.com wrote:
I disabled text.markup and used default font for mathtext.default option, see d8f90a0. The rc file should be very conservative and work across multiple version of matplotlib (the one which is installed by default).
Reply to this email directly or view it on GitHub: https://github.com/vkuznet/cmssh/issues/13#issuecomment-5207220
Hi, I get these warnings when I start cmssh:
This happens because I have my matplotlibrc set up to use latex. You might consider forcing the system to use a matplotlibrc that you have written rather than picking up the one in the home directory to prevent problems like this. I've written a matplotlibrc that looks somewhat like the official CMS plot style, if you'd like me to send it to you.