Re: [ROOT] TMultigraph tick marks

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Aug 04 2004 - 15:48:08 MEST


Hi Ricardo,

a TMultiGraph was not supported by TPad::RedrawAxis. I have added the
implementation in the CVS version.
There is a work around with your version as shown in the small example below

Rene Brun


void multifill() {
   TCanvas *c1 = new TCanvas("c1");
   TMultiGraph *m = new TMultiGraph();
   const Int_t n = 5;
   double x[n] = {0,10,12,12,0};
   double y[n] = {0,0,5,5,5};
   TGraph *gr1 = new TGraph(n,x,y);
   gr1->SetFillColor(38);
   m->Add(gr1,"fp");
   m->Draw("a");
   m->GetHistogram()->DrawCopy("sameaxis");  //workaround
   //c1->RedrawAxis(); ok with the CVS version
}
   

Ricardo Eusebi wrote:
> 
> Hi,
> I'm using TMultigraph to display several graphs, some of them are just
> lines and some of them are filled Graphs. Whatever I do the tick marks
> of the Y axis are always BELOW the graph. How do I correct that?
> I'm using 3.05 but can use any other version.
> 
> Thanks,
> Ricardo
> 
> --
>   --------------------------------------------------------------------
> | Ricardo Eusebi                |   Office :  CDF trailer 168-"O"    |
> | High Energy Physics           |   Phone  : (630) 840 8622          |
> | University of Rochester       |   email  : eusebi@fnal.gov         |
>   --------------------------------------------------------------------
> |               Fermi National Accelerator Laboratory                |
> |                    CDF - MS318 .  PO Box 500                       |
> |                     Batavia 60510, Illinois.                       |
>   --------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET