I have a GUI app that plots a TH2F in cylindrical coordinates, using
myHist->Draw("SURF5 CYL")
The user can then use two sliders to change the orientation of the resulting plot by changing the Phi and Theta values of the TPad within which the TH2F is drawn,
myPad->SetPhi(new_phi);
myPad->SetTheta(new_theta);
The problem is that during the rotation the plot resizes itself to make the most use of the TPad, which is annoying aesthetically. I’ve included an image demonstrating this.
I had considered (and tried, with very moderate success) to stop this from happening by dynamically altering the size of the TPad within the TCanvas during rotation so that, from the user’s point of view, the scale doesn’t change, but this is quite unwieldy.
Is there an easier way to avoid the 3D plot resizing itself to best fit the TPad? Maybe using the TView3D class used to draw it?