How to change TView default rotation setting

Hi,

I have a problem related to TView: in my application, the user is delivered a 3D histogram (TH3D), which pops up in a certain (normally quite reasonable) orientation. Now for our purpose, a different orientation turns out to be more useful. To make sure the histogram comes up with this new orientation, I do

So far so good, but this has the disadvantage that when the user changes the rotation (by mouse-dragging), his or her choice will always be overwritten by the above command, whenever a new plot is created. Without the rotation above, this is not the case: the histogram is displayed in the default orientation, but as soon as the user performs a rotation, subsequent plottings use this new orientation (so that the user can step through different cases/steps whatever, always keeping the same orientation).

I wonder if there is a way to have my default rotation and let the user keep his or her favorite viewing angle… is there a way to change the default orientation somehow? Or should I retrieve the current rotation angles, save them, and apply them when plotting?

Many thanks for any advice!

Thomas

why don’t you use

c1->SetTheta() and c1->SetPhi() ? (c1 is the canvas)

Well, it just hadn’t occurred to me that this is something to be changed by the canvas. Between TPad, TView and TCanvas it is sometimes hard to figure out what is set via which class… I guess this is what the forum is here for!

Thanks very much in any case, my problem is solved.

Thomas