[ROOT] Style inconsistency in drawing histograms

From: Benjamin E. Norman (bnorman@kent.edu)
Date: Sun Oct 22 2000 - 22:24:19 MEST


Hi,
     I couldn't find the answer to this question in the roottalk archives, and 
I've wasted enough time trying to divine the answer myself that I thought I 
should ask the experts.
     There seems to be some inconsistency about how and when styles must be 
applied to histogram objects to bring about the desired effect.  For example, 
if I do

gStyle->SetOptStat(10);
h1->UseCurrentStyle();
h1->Draw();

I see an expected modification of the default statistics display.  However, if 
I do

gStyle->SetHistLineStyle(3);    // also tried gStyle->SetLineStyle(3)
h1->UseCurrentStyle();
h1->Draw();

I see no effect (solid line, not dotted).  To get this to work, I must do

h1->Draw();
gStyle->SetHistLineStyle(3);
h1->UseCurrentStyle();
gPad->Update();

     Is there a preferred and uniform way of applying (all types of) style to 
histograms?  I'd be very happy to find one.

Thanks,
Ben Norman

----------------------------------------------------------------------
Benjamin E. Norman                                    bnorman@kent.edu
Kent State University Physics Dept            http://kent.edu/~bnorman
----------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:35 MET