How can we set Xmax, Xmin, Ymax and Ymin values in graph.C file?
I am using root_v6.14.06
graph.C (853 Bytes)
Hi,
I believe you can use SetLimits
in TAxis
for the two axis:
https://root.cern.ch/doc/master/classTAxis.html#aa56ec858687dad0b58ca0cf939e7c79b
So you can do gr->GetXaxis()->SetLimits(xmin, xmax)
and similarly for y axis.
You are right. Its works
There is another question, how to set title of individual curve on right top corner of plot in multigraph.C?
multigraph.C (1.2 KB)
@couet can you take this one? Thanks!
If you mean a TLegend, just follow the first example there; note that you don’t have to add a header to the legend.
Yes TLegend would be the way to do it.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.