Hi all,
Is there a way of setting the default paint style inside of a .rootlogon script? I can do the canvas operations just fine, and create palettes and all, but if I do
TStyle *myStyle = new TStyle(“myStyle”,“How I like it”);
myStyle->SetPalette(55);
myStyle->SetDrawOption(“COLZ”);
The histos are still not plotted with color.
Also, I can’t seem to find how to change the fill style to include colors from within a TTree viewer. Can anyone point me to a tutorial that might have this info?
Sorry. My post did not make my problem clear. My logon script contains:
// Definition of new styles
TStyle *myStyle = new TStyle("myStyle","my style");
myStyle->SetPalette(55);
myStyle->SetDrawOption("COLZ");
// Select Which Style to
gROOT->SetStyle("myStyle");
gROOT->ForceStyle();
This does not cause histograms to be plotted with color by default.
Many thanks!
Well the skeleton of my rootlogon.C script is below:
TStyle *myStyle = new TStyle("myStyle","my style");
myStyle->SetPadTickX(1); // Sets tick marks on horizontal axis
myStyle->SetPadTickY(1); // Sets tick marks on vertical axis
myStyle->SetOptStat(0);
myStyle->SetPalette(55);
myStyle->SetDrawOption("COLZ");
gROOT->SetStyle("myStyle");
gROOT->ForceStyle();
When I open a file with histograms, the ticks are present and the stats are absent. But the histograms are not drawn with color. I don’t know how to provide a macro for this. When I open root I get the following revision information. Does this help?
ROOT 5.34/26 (v5-34-26@v5-34-26, Feb 20 2015, 13:23:25 on macosx64)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
I put in the only draw option I could find that resembles what I want to do. Was aware that it is logically ill-defined. But a command of that sort is what I am looking for–i.e. one that forces all histograms to be painted with color (or only 2D/3D histos I guess).
The purpose of the logon macro for me is to not need manual checking of boxes. For one thing I often talk to root over an ssh connection, and graphical manipulation is slow. (It doesn’t make sense to copy to my laptop, there are often many very large files).
Is there a way to use a logon macro to force histograms to be plotted with color? It would sure be a neat feature.