Hi Matt,
An example:
{
gROOT->Reset();
TCanvas c1("c1");
Double_t xmin = 5;
Double_t xmax = 10;
TH1F h("h","test",100,xmin,xmax);
h.FillRandom("expo",1000);
h.SetStats(0);
h.Draw();
c1.Update();
Double_t ymax = c1.GetUymax();
TF1 faxis("faxis","1/x",1/xmax,1/xmin);
TGaxis axis(xmin,ymax,xmax,ymax,"faxis",515,"-");
axis.SetLabelSize(0.03);
axis.Draw();
}
Rene Brun
On Fri, 10 Jan 2003, Matthew Wood wrote:
> Hi. I am trying to draw a TGraph with two sets of x axes. I would like
> to have a top axis that displays 1/(coordinate of bottom axis). I have
> been able to add a top axis that has different limits than the bottom axis
> but I can't figure out how to make the values of the top axis a function
> of those of the bottom axis. Perhaps this is the wrong way to approach
> this problem.
>
> Matthew Wood
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:08 MET