How can i set x axis and y axis in scatter plot?

Hi experts!
I wanna get scatter plot of coincidence event between one event location and others event locations.
Screenshot from 2021-04-26 09-20-40

I wanna set the X axis to C2_noise.
And i wanna set the Y axis to C1_HE,C3_HE,C4_HE,C6_HE,C7_HE .
How can i set these?
Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Hi @HyungJoe_Kwon ,
ROOT’s class to draw scatter plots is TGraph: ROOT: TGraph Class Reference , see the docs and the related graphs tutorials at ROOT: Graphs tutorials .


You didn’t tell anything about your data format. Is it it vectors ? Trees ? in case of the later you can simply use TTree::Draw:


The data format is tree.
Than before type T->Draw(“y:x”)
May i define the x and y?

See: Trees - ROOT

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.