4
$\begingroup$

After the plot is drawn I can change its dimension using the mouse. Is it possible to specify the dimension of the plot before it is drawn?

I am looking for something like

Plot[fun[x],{x,xmin,xmax},Dimesion->{xpoints, ypoints}]

I know about ImageSize, but I want to specify the x and y points.

$\endgroup$
4
$\begingroup$

Use AspectRatio -> Full to have the graphic stretched to fill the rectangle specified with the option ImageSize -> {xpoints, ypoints}:

Plot[Sin[x], {x, 0, Pi}, ImageSize -> {600, 100}, AspectRatio -> Full]

enter image description here

$\endgroup$
2
$\begingroup$

To set the size of the image canvas you can use

ImageSize -> {xpoints, ypoints}.

This may not do what you intend, as it will just add white space to fill out the figure to the aspect ratio set by {xpoints, ypoints}. To change the aspect ratio of the plotted regio use the AspectRatio option.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.