I have a TGraph with different run numbers on the X axis and noise RMS values on the Y axis. Is it possible to change the marker style at some specific X point due to some condition? In pseudo code
if (is bad channel in run 179600)
gr.SetMarkerStyle( at point 179600 to 34)
Hope the question is clear and I hope more to have answers!
The marker style is the same for all the points in a given TGraph. Maybe you can achieve what you are looking for using several TGraph grouped in a TMultigraph.
I’m already superimposing TGraphs() and I tried with the multigraph but it crashes (there is a question in pyROOT support) so I use the canvas method.
then I will try to set some kind of mark at some specific location, any suggestion?
Without using TMultiGraph, you may also define another TGraph which contain the “bad” points.
With pseudo-code, it gives something like
vector <int> Xall, Yall; // contain all the points
vector <int> Xbad, Ybad: // contain the "bad" points
here you fill the vectors Xall and Yall
if(bad point)
fill the vectors Xbad and Ybad
TGraph *gAll = new TGraph(Xall.size(),&(Xall[0]),&(Yall[0]));
gAll->Draw("ALP");
TGraph *gBad = new TGraph(Xbad.size(),&(Xbad[0]),&(Ybad[0]));
gBad->SetMarkerStyle(20);
gBad->SetMarkerSize(2);
gBad->Draw("P");