Very simply:
How do I make a scatter plot with more than 1 value per x-coordinate?
I just want to be able to place points in a plane with x-y values, not being constrained to 1 x-value per y-value, OR vice versa.
A Thousand Thanks,
-Dominic
Very simply:
How do I make a scatter plot with more than 1 value per x-coordinate?
I just want to be able to place points in a plane with x-y values, not being constrained to 1 x-value per y-value, OR vice versa.
A Thousand Thanks,
-Dominic
Simply create a TGraph object
TGraph *g = new TGraph(n,x,y); //where x , y are 2 arrays of n points
and draw this graph with option “p”
g->Draw("p");
Rene
Do not forget the option “a” if your TGraph is plot on an empty pad, and if you need to plot the axis:
g->Draw("ap");
without “a” the axis will not be drawn.