I am trying to put multiple plots on a single graph, with the same scale. I can do this with multigraphs and arrays but i am trying to do this when data is stored in a TTree.
I have the following code but so far only one plot appears on the graph.
root_tree->Draw(“g2:time”,"", “CP”, 20,mintime);// second plot
graph2 = (TGraph*)gPad->GetPrimitive(“Graph”);
graph2->SetLineColor(2);
graph_both->Add(graph2, “CP”);
graph_both->Draw(“C*”);
fCanvas4->Update(); // this function runs in a loop hence the update
fCanvas4->Clear(); // and clear commands.
thanks rene.
I am trying to disable the title box that appears on the graph.
I tried to use root_tree->SetTitle(" "); but SetTitle doesnt seem to effect the title of graphs from trees.
i also tried to access the graph in the tree by :
TGraph graph = (TGraph)gPad->GetPrimitive(“Graph”);
graph->SetTitle(“somethingelse”);
but also yielded no results. Im not understanding why this doesnt work.