That’s a Python error that does not have to do with ROOT, I think it’s because the TCanvas arguments use backticks ` instead of double quotes ". I fixed my original snippet.
In any case RDataFrame is not available in v6.10 I’m afraid.
I guess you can retrieve the TGraph from the canvas or gROOT instead.
Cheers,
Enrico
I agree with you, I can use TGraph from canvas, but there`s a problem since I draw multiple plots with the ‘same’ option and some data points are lost. This happens because sometimes first drawn graph has y-axis ranges smaller then the next one. Maybe you can help me with this?
For example:
@couet can probably help with axis range issues
It would probably be helpful if you could provide a self-contained reproducer (something we can run ourselves, or the data needed to run the snippet above).
Group the graph in a TMultiGraph which will compute for you the global range.
On a side note, the “same” option is not a TGraph::Draw option. By default a graph is drawn on the current plot (unlike the histograms which need “same” to do that). On the opposite the option “A” for TGraph allows to start a new plot. We have been obliged to handle the case of “SAME” for TGraph, as many people (like you) did that mistake. So “SAME” on TGraph is simply ignored.
Actually I`m familiar with the TMultiGraph class, but there is a problem how can I ‘convert’ TTree content to TGraph and than everything will be easier? Enrico came out with an idea but it was not working for my ROOT version.