Hi Mark, An other possible way is the attached example. Cheers, Olivier On Thu, 15 Apr 2004, Rene Brun wrote: > Hi Mark, > > 2-D histograms with axis coordinates increasing from right to left are > not supported. However, you can visualize a 2-D histogram with the option "surf" > by setting the viewing angles such that, eg the x axis coordinates will go > from right to left as shown in the small example below. > > Rene Brun > > { > TH2F *hpxpy = new TH2F("hpxpy","py vs px",40,-4,4,40,-4,4); > Float_t px, py; > TRandom r; > for (Int_t i = 0; i < 25000; i++) { > r.Rannor(px,py); > hpxpy->Fill(px,py); > } > TCanvas *c1 = new TCanvas("c1"); > c1->SetTheta(90.001); > c1->SetPhi(90.001); > hpxpy->Draw("surf2"); > } > > > Mark Polsen wrote: > > > > Hello all, > > > > Is there a way to reverse the lower and upper ranges for a TH2D? I'm > > using 2D histograms to display astrophysical sources in galactic > > coordinates. Currently, I can only display the longitude coordinates > > increasing from left to right. I'd like to display the longitude > > coordinates increasing from right to left. > > > > Thanks, > > Mark > > -- Org: CERN - European Laboratory for Particle Physics. Mail: 1211 Geneve 23 - Switzerland Mailbox: J25910 E-Mail: Olivier.Couet@cern.ch Phone: +41 22 7676522 WWW: http://cern.ch/Olivier.Couet/ Fax: +41 22 7677155
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET