Hi all,
I’m looking to draw a horizontal line in a sub-pad (created with TCanvas::Divide()), going from the X axis minimum value to its max value:
TGraphErrors *magres = new TGraphErrors(mlig, mjd, mmag, mjde, merr);
TCanvas *c1 = new TCanvas("c1","",0,0,700,900);
c1->Divide(1,4);
[...]
c1->cd(2);
magres->Draw("AP");
double xmin = gPad->GetUxmin();
double xmax = gPad->GetUxmax();
TLine *zero = new TLine(xmin, 0, xmax, 0);
zero->Draw();
[...]
But, xmin = 0, xmax = 1, instead of ~80 and ~170 respectively.
I suspect that gPad refers not to the current subpad but to the global Pad?
If so, how to get the user coordinates of a sub-pad window?
Many thanks for any help!
Guillaume