When displaying graphics in the Mathematica front end, and leaving ImageSize
at the default, the result will always keep its previous size.
For example,
Plot[Sin[x], {x, 0, 5}]
produces an output 360 pixels wide (the default size).- Resize the plot with the mouse to make it bigger.
- Change the input to
Plot[Sin[x], {x, 0, 10}]
and re-evaluate it. - The output figure remains at its manually set size and won't revert to 360 pixels wide.
If we were to use Plot[Sin[x], {x, 0, 5}, ImageSize -> 500]
instead, then the size of the output would be re-set to 500 pixels every time this command is re-evaluated.
ImageSize -> Inherited
will generally allow this behaviour.
Question:
How can I create a function that will output graphics at sizes larger than 360 pixels by default, yet when re-sizing the output manually and re-evaluating the function, the manually set size will be kept?
I do not wish to change the default output size for other functions.
"Graphics"
; in the Options inspector, change theImageSize
setting underGraphicsBoxOptions
to500
(or whatever). Alternatively, create a new style"Foo"
and useBaseStyle -> "Foo"
in yourGraphics
. $\endgroup$"Foo"
is what you're after. The first changes it for allGraphics
. -- Actually,Plot[..., BaseStyle -> {GraphicsBoxOptions -> {ImageSize -> 500}}]
seems to work. (Maybe?) $\endgroup$GraphicsBoxOptions
when I saw your comment. $\endgroup$