Is there an argument for ImageSize such that the Graphics or Manipulate automatically fits the Notebook Width.
How about
Plot[Sin[x], {x, -5, 5}, ImageSize -> Full]
EDIT: or
Manipulate[
Show[
{
Plot[Sin[alpha*x], {x, -5, 5}],
Plot[Cos[alpha*x], {x, -5, 5}]
},
ImageSize -> Full
],
{alpha, 1, 2}
]
Here is another option apart from Acl's solution:
width := 0.85Cases[NotebookGet[], (WindowSize -> {x_, _}) -> x]
Plot[Sin[x], {x, -5, 5}, ImageSize -> {width, Automatic}]
The drawback with this approach is that the space on the left (where you have In[10]:=
, etc.) is constant and doesn't change with notebook width. So the % of the width I have used above will vary depending on the width of your notebook. It is possible to compensate for that, but I'm not going to do that. However, once you fix your width and find a sweet spot, it should be good.
This is useful in cases where you need to explicitly provide the dimensions/coordinates and can't use an option like Full
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With