Force to write axis in exponetial

Hi,

I want to write the axis label in exponent (8X10^4) even it is few thousands. I used h1->GetYaxis()->SetNoExponent(kFALSE). But it did not work. I have attached a simple code.

Thanks,
Manojg
check.C (155 Bytes)

see your example modified below

void check() { TH1F *h1 = new TH1F("h1", "h1", 100, -2.0, 2.0); h1->FillRandom("gaus",5000000); TCanvas *c = new TCanvas; c->SetLogy(); h1->Draw(); }

Rene

Sorry for misunderstanding. I want to write the y-axis in linear scale (not log scale), but like 4X10^4. c->SetLogy() changes it to log scale.

Thanks.

Use:

 TGaxis::SetMaxDigits(2);