2D plot from interactive ROOT

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.

https://root.cern/doc/master/classTTree.html#a73450649dc6e54b5b94516c468523e45

1 Like

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 :slight_smile: He is right. I added the RDataFrame doc for completeness!