"Auto Resize Canvas" Option OFF by default


How do I switch the “Auto Resize Canvas” Option OFF by default? It can be changed from the Canvas GUI but by the time its accessible, the Canvas already resizes.

Is there a variable I can set in my rootlogon.C for that. My search has not turned up anything yet.


ROOT 5.33/01 (trunk@42549, Dec 20 2011, 22:53:40 on linux)
OS: Ubuntu Lucid - 32 bit

I have tried changing my system.rootrc in the following manner:

Canvas.AutoResize: false
Canvas.AutoResizeCanvas: false
Canvas.Resize: false

None of them work.

It works for ResizeOpaque so I know its reading the system.rootrc.

The reason I want this to work is because I want high resolution png files and my machine resizes the Canvas to fit my screen and then saves them at a different resolution instead of the default specified.

Any suggestions on workaround or the right way to do this will be very helpful.


Edit: One Solution to create High resolution PNG files is to run root in batch mode with ‘root -b’, This way the Canvas doesn’t resize on X-Display and the original resolution and aspects for the images are preserved. I would still like to know how to turn the Auto Resize off though, Since if I use it in interactive non-batch mode, It resizes image on the fly and the first few images saved are whacky, a superposition of the original size with new resized size.

These options are accessible only via the GUI.


Do you have any recommendations for producing a canvas with many graphs one. I want to scroll through on the canvas but make the window size suitable for the monitor.

I have added

This does not produce a scroll bar but instead it resizes the graphs such that all the graphs fit in the window. I then cannot go back to the correct scale.

(sorry just noticed that this post was Feb 2012 not the 12th of Feb)


For me, typing this:

root [0] TCanvas c;
root [1] c.SetCanvasSize(1200, 2500);

Make the canvas having scrollbars on both sides…

I write the canvas to a root file with these setting. When I open the canvas from TBrowser it auto resizes such that the canvas fits on the screen

Indeed. This is only valid with a “on screen” canvas

Okay thanks. I have found a work around by resizes the canvas (option on right clicking) after the auto resize.