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  TH2F *h2 = new TH2F("h", "h", 21, 0, 21, 100, 0, 1000)
root  h2->GetXaxis()->SetBinLabel(1, "adsf")
root  h2->Draw();
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root  h2->GetXaxis()->LabelsOption("v")
root  gPad->Modified()
root  // --> here the label is vertical
root  h2->Draw("lego1");
root  // --> now it is not vertical anymore
Thank you for your help to the numerous questions I am asking on the forum,
Olivier will process your problem once he is back from holidays.
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.
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.
I put it on my list (it was already there in some way).