[ROOT] Setting Zaxis range in a 2D Histogram surface plot.

From: Brendan Rankin (brendan.rankin@siliconmetrics.com)
Date: Thu Apr 19 2001 - 05:07:31 MEST


Hello ,

Here's a synopsis of what I'm doing....

I define two histograms, like so:

TH2F custErr("AtoY_cell_rise_custErr","Cell Rise Path A to
Y",10,transBins,10,loadBins);
TH2F smcErr("AtoY_cell_rise_SMCErr","Cell Rise Path A to
Y",10,transBins,10,loadBins);

After filling these with data, I get the maximum and minimum values from
the custErr histogram:

Float_t cust_max=custErr->GetMaximum();
Float_t cust_min=custErr->GetMinimum();

I am then using these values to set the Zaxis range in both histograms:

smcErr.GetZaxis()->SetRange(cust_min,cust_max);
smcErr.Draw("surf1zfb");

custErr.GetZaxis()->SetRange(cust_min,cust_max);
custErr.Draw("surf1zfb");

Unfortunately, this doesn't impact what is drawn in the plot at all.
The Zaxis is still sized, automatically, according to the data that is
contained in each histogram, even though I've set this range manually.

Am I not doing something correctly?  Or, is what I'd like to do even
possible?

Thanks, in advance, and Best Regards,

- Brendan



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:43 MET