Re: [ROOT] Associating TGaxis with coordinate system

From: Rene Brun (brun@pcbrun.cern.ch)
Date: Sat Nov 13 2004 - 12:50:59 MET


Use TPad::Range if you want to set the pad user coordinates range and 
want to draw yourself using the basic primitives.
However it looks like you simply want to do something like
in the top picture of the tutorial hbars.C
it is easy to remove the drawing of the axis (x,y) with eg
  h->GetXaxis()->SetLabelOffset(99)
and/or also setting the tick marks length to 0.

If this is not what you want, please specify exactly what you try to 
achieve.

Rene Brun

On Sat, 13 Nov 
2004, 
Roland Kuhn wrote:

> Hi Rene!
> 
> On Nov 12, 2004, at 10:28 PM, Rene Brun wrote:
> 
> > Roland,
> >
> > Have a look at tutorials
> > labels1.C
> > labels2.C
> > hlabels1.C
> > hlabels2.C
> > cernstaff.C
> >
> I know that I can put labels on the X axis, but I don't want to have an 
> X axis... In the end I would like to draw the graph from top to bottom 
> (instead left to right) and put labels on the left side, again without 
> any axis, because it doesn't make much sense. This rotation does not 
> concern me right now, but I would like to zoom the graph. Can you point 
> me to the place in the ROOT source where the association is made 
> between the TFrame and the pad coordinate system when drawing a 
> standard histogram? Or is this mechanism in principle not usable 
> without a TFrame?
> 
> > Rene Brun
> >
> > On Fri, 12 Nov 2004, Roland Kuhn wrote:
> >
> >> Hi!
> >>
> >> I'm trying to paint a graph with no X axis and TLatex labels instead,
> >> but I don't find a way to associate the manually drawn TGaxis with the
> >> pad coordinate system to allow zooming along that axis. I've seen this
> >> working, but I cannot remember what I changed to break it :-( Right 
> >> now
> >> I'm putting the labels into the TCanvas, create a TPad inside (the
> >> upper 80% of the canvas), draw the graph without axis in there and 
> >> then
> >> create a TGaxis.
> >>
> >> Thanks for your help,
> >> 					Roland
> >>
> >> --
> >> TU Muenchen, Physik-Department E18, James-Franck-Str. 85747 Garching
> >> Telefon 089/289-12592; Telefax 089/289-12570
> >> --
> >> A mouse is a device used to point at
> >> the xterm you want to type in.
> >> Kim Alm on a.s.r.
> >>
> >
> >
> 
> Ciao,
> 					Roland
> 
> --
> TU Muenchen, Physik-Department E18, James-Franck-Str. 85747 Garching
> Telefon 089/289-12592; Telefax 089/289-12570
> --
> A mouse is a device used to point at
> the xterm you want to type in.
> Kim Alm on a.s.r.
> 



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