Re: how to put tex in

From: John Idarraga <idarraga_at_cern.ch>
Date: Thu, 2 Jul 2009 10:33:33 +0200


Hi,

You want to use a TLatex or TText, may be ? Check them out here

http://root.cern.ch/root/html/TLatex.html

Just calling the constructor of any of those will do.

John

On Thu, 2009-07-02 at 16:20 +0800, Bian JianMing wrote:
> Hi all,
> May be a stupid question. How can i put (a) (b) (c) (d) ..
> in each pad of a canvas?
>
>
> With my best wishes,
>
> Bian Jianming
> Experimental Physics Center,
> Institute of High Energy Physics(IHEP),
> Chinese Academy of Sciences
> P.O.Box 918-1
> Beijing, 100049
> P.R.China
>
>
> achilleas 写:
>
> > Hello all,
> >
> > I have the following wierd behaviour in a stack of histograms (THStack)
> > with a logarithmic y-axis: the color (only) of the last bin of (only) one
> > of the stacked histograms gets somehow changed into the color of another
> > histogram. The effect dissapears when I remove the log scale at the
> > y-axis. Note that the sum of values in the last bin is actually correct -
> > it's only the colour that gets mixed up.
> >
> >
> > Here is the code:
> >
> > void miscolored_bin() {
> >
> > THStack *hs = new THStack("hs","miscolored bin effect in stacked
> > histograms");
> > TH1F *h1_gluons = new TH1F("h1","E1 accuracy",4,0,400);
> > TH1F *h1_qqgluons = new TH1F("h2","E1 accuracy",4,0,400);
> > TH1F *h1_bar = new TH1F("h3","E1 accuracy",4,0,400);
> >
> > h1->Fill(50,1000.0);
> > h1->Fill(150,100.0);
> > h1->Fill(250,10.0);
> > h1->Fill(350,1.0);
> > h2->Fill(50,1000.0);
> > h2->Fill(150,100.0);
> > h2->Fill(250,10.0);
> > h2->Fill(350,1.0);
> > h3->Fill(50,1000.0);
> > h3->Fill(150,100.0);
> > h3->Fill(250,10.0);
> > h3->Fill(350,1.0);
> > h1->SetFillColor(kBlue);
> > h2->SetFillColor(kGreen);
> > h3->SetFillColor(kRed);
> >
> > hs->Add(h1);
> > hs->Add(h2);
> > hs->Add(h3);
> > TCanvas *c1 = new TCanvas("c1","big canvas",0,0,1200,800);
> > gPad->SetLogy();
> > gPad->SetGrid();
> > hs->Draw();
> > }
> >
>
Received on Thu Jul 02 2009 - 10:33:54 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 02 2009 - 17:50:02 CEST