Lego1 -> no vertical labels?

Hello,

How to rotate the X axis labels in a TH2 plot drawn in “lego1” ?

When the plot is drawn in “colz” the label is nicely put vertically (optionsLabel “v”) but not with lego1.

See the code :

root [0] TH2F *h2 = new TH2F("h", "h", 21, 0, 21, 100, 0, 1000) root [1] h2->GetXaxis()->SetBinLabel(1, "adsf") root [2] h2->Draw(); <TCanvas::MakeDefCanvas>: created default TCanvas with name c1 root [3] h2->GetXaxis()->LabelsOption("v") root [4] gPad->Modified() root [5] // --> here the label is vertical root [6] h2->Draw("lego1"); root [7] // --> now it is not vertical anymore root [8]

Thank you for your help to the numerous questions I am asking on the forum,
Barth

Olivier will process your problem once he is back from holidays.

Rene

With legos and surfaces the labels are always drawn in an automatic way. They are adjusted according to the view angles. You can change the distance to the axis and the labels’ size.
optionsLabel “v” does not apply. Its is, may be, something which can be done in the future.

Hi,

thank you for your reply.

Indeed, it would be nice if you could add to your todo list this item. Vertical of course doesn’t mean anything in a 3d view that you can rotate, but what I implied when using this option was to have the titles perpendicular to the axis.

Cheers,
Barth

I put it on my list (it was already there in some way).