TGaxis top-down?

From: Ilya Goz (goz@post.krascience.rssi.ru)
Date: Mon Apr 03 2000 - 11:54:49 MEST


Hello,

I need to make TGaxis with values running top-down, where
minimum value is on top, i.e.

0    |-
500  |-
1000 |-
1500 |-
2000 |-
2500 |-

Following macro doesn't work as (perhaps naively) expected:

{
    gROOT->Reset();
    TCanvas *c = new TCanvas("c", "Axis test", 2);
    c->Range(-500,0,500,1000);
    TGaxis *goodAxis = new TGaxis(-300, 100, -300, 900, 500, 2500, 512, "", 50);
    // this doesn't work
    TGaxis *badAxis = new TGaxis(300, 100, 300, 900, 2500, 500, 512, "", 50);
    // neither do this
    TGaxis *badAxis2 = new TGaxis(0, 900, 0, 100, 500, 2500, 512, "", 50);
    goodAxis->Draw();
    badAxis->Draw();
    badAxis2->Draw();
    c->Update();
}

Thank you.
Ilya V. Goz



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:22 MET