Hello,
I would like to do a 2D plot of data in two branches of a TTree.
To plot data in a single branch I do (assuming the Tree is called NOMINAL):
> NOMINAL -> Draw("branch_name")
and it works fine. Now I would like to do a 2D plot of two branches, branch_name_1 VS branch_name_2.
Do you know the command to do this?
I tried:
> NOMINAL -> Draw("branch_name_1", "branch_name_2")
but it is not working. Thank you very much for your help!
Best,
Giovanni.
Danilo
3
Hi,
The instructions can be found here: ROOT: TTree Class Reference
You can also opt for RDataFrame, to take advantage of features like parallel processing.
Cheers,
D
EDIT:
@dastudillo anticipated me
He is right. I added the RDataFrame doc for completeness!
Thanks, the option
- “e1:e2” produces an unbinned 2-d scatter-plot (TGraph) of “e1” on the y-axis versus “e2” on the x-axis
made what I was looking for.
Giovanni
1 Like
system
Closed
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.