Looking at your instructions for using rootplot together with CMSSW on this page: http://packages.python.org/rootplot/, I've got a suggestion.
Even though following these instructions an 'import PhysicsTools.PythonAnalysis.rootplot' works from within CMSSW, things like 'import PhysicsTools.PythonAnalysis.rootplot.root2matplotlib' do not (since internally rootplot is just referred to as rootplot):
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/afs/cern.ch/cms/slc5_amd64_gcc434/cms/cmssw/CMSSW_4_2_8/python/PhysicsTools/PythonAnalysis/rootplot/root2matplotlib.py", line 34, in <module>
from rootplot import utilities
ImportError: No module named rootplot
Instead of importing something from PhysicsTools.PythonAnalysis, it's probably easier to just do 'export PYTHONPATH="$CMSSW_RELEASE_BASE/python/PhysicsTools/PythonAnalysis/:$PYTHONPATH"' (or your shell's equivalent). That way everything just works.
And by the way, at least as of CMSSW version 4.2.8 matplotlib seems to work as well, so the warning in your instructions can be removed.
Best regards,
Jeroen
--
* Jeroen Hegeman
* Princeton University CMS group
* Office 40-1-B06
* Mailbox E27710
* email: jeroen....@cern.ch
* tel. (office): +41 22 76 71504
* tel. (mobile): +41 76 48 71395
Thanks for looking into this and letting me know. Hopefully, after
the current analysis push is over, I can spend a day doing some
updates to rootplot and fixing the documentation.
// Jeff