Zaxis from a TF2

Hello rootting people,

I just started to use ROOT and I was surprised how fast I could make a plot or even a 3d plot by just reading the manual (compared to PAW where I only obtained a green football field). After playing arround with it for some time I stumbled upon some problems which I can not figure out how to do it.

Assume the following simple 3 line of code

TCanvas *c1 = new  TCanvas("c1","just a title",1);
TF2 *f2 = new TF2("saddle","x*x-y*y",-1,1,-1,1);
f2->SetNpy(100);
f2->SetNpx(100);
f2->Draw("surf1");
TAxis *Xax = f2->GetXaxis();
TAxis *Yax = f2->GetYaxis();

The questions I have now are the following
[ul]
[li] How do I pick the Zaxis because f2->GetZaxis(); isn’t allowed[/li]
[li] By putting Npx and Npy to 100, the surf1 plots 100 lines in x and 100 lines in y. But how can I keep this to only 30 but still holding npx and npy 100 for having a smooth surface (ofcourse i use this for other functions then xx-yy)[/li][/ul]

Thanks in advance

Klaas

The GetZAxis function is only implemented in the CVS version.
In your version, do
TAxis *Zax = f2->GetHistogram()->GetZaxis();

Rene

Thanks brun for the quick response,

Although I stumbled now on a new problem.
When creating a TF2 object and picking from it the zaxis using the above, ROOT automatically changes the limits of the axis to the minimum and maximum value needed.

Asume that the zaxis goes from -1 to 1, how can i make a zoom in that axis? In such way that it plots from 0 to 0.5 or from -2 to 2?

thanks again

klaas

[quote]Although I stumbled now on a new problem.
When creating a TF2 object and picking from it the zaxis using the above, ROOT automatically changes the limits of the axis to the minimum and maximum value needed.

Asume that the zaxis goes from -1 to 1, how can i make a zoom in that axis? In such way that it plots from 0 to 0.5 or from -2 to 2? [/quote]

to zoom on an axis, press the left mouse button to the starting value
and release it to the end value.
Another possibility is to activate the graphics editor from the “View” menu
and use the axis slider.

Rene