Hi Adam, The objects added to an histogram are drawn with the default drawing options. I have made a simple change in THistPainter in CVS to paint the histogram suite of objects with the option specified when adding the object. See example below. Rene Brun void pmadd() { TH2F *hpxpy = new TH2F("h2","test palette",30,-3,3,30,-3,3); Double_t a,b; for (Int_t i=0;i<15000;i++) { gRandom->Rannor(a,b); h2->Fill(a,b,1); } TGraph *gr = new TGraph(5); gr->SetPoint(0,-2,-2); gr->SetPoint(1,-2,-1.5); gr->SetPoint(2,-1,-0.5); gr->SetPoint(3,0,2); gr->SetPoint(4,2,2); gr->SetLineColor(2); gr->SetMarkerStyle(21); gr->SetMarkerColor(4); hpxpy->GetListOfFunctions()->Add(gr,"lp"); hpxpy->Draw(); } On Wed, 3 Jul 2002, Adam Bouchta wrote: > > I am Add-ing a TGraph to a TH2F and then Write-ing the TH2F to disk. > When I look at the TH2F later on using a TBrowser, the markers I had > assigned to the TGraph with SetMarkerStyle() are not there anymore. > > What puzzles me is that the red color I had assigned the TGraph using > SetLineColor IS still kept. > > So my question is how to keep the marker information? > > Adam Bouchta >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:58 MET