Hi,
I am running root 5.20/00 on macosx.
I create a TGraph from a TTree using
tree->Draw("y:x:colour","","col")
which produces a scatter plot with coloured points. If I use the canvas menu (File -> Save As) to save the canvas as a .C macro, then the macro doesn’t include enough info to reproduce the plot. Specifically the following line appears in the macro.
//Primitive: graphs/An array of objects. You must implement TObjArray::SavePrimitive
The following code doesn’t change the marker as expected.
TGraph *graph = (TGraph*)gPad->GetPrimitive("Graph");
graph->SetMarkerStyle(20);
graph->SetMarkerSize(1);
Regards,
Mark