How to change rotate view of the TH3 using 'glcolz'

Hi,
I use the option ‘glcolz’ to draw a TH3D histogram, I am wondering how to change rotate view of the TH3? I use the line:

gPad->GetView()->RotateView(0.1,0);
which caused a crash.

Cheers,
Zhiyi.

[quote=“zhiyiliu”]Hi,
I use the option ‘glcolz’ to draw a TH3D histogram, I am wondering how to change rotate view of the TH3? I use the line:

gPad->GetView()->RotateView(0.1,0);
which caused a crash.

Cheers,
Zhiyi.[/quote]

GL does not use TView, so gPad->GetViewe() returns you the null pointer. You can use gPad->SetTheta(theta) and gPad->SetPhi(phi) to specify angles.