# Plotting: Basic Question [duplicate]

I am new user.

I am plotting "y = x^3". My "x" domain is "{x, -5, 5}", but then it scales for all "y" values.

Is there anyway to zoom in, or have it plot/display a limited "y" range of values? The scaled "y" values make the graph look flatter, than it is for "y = x^3".

I have tried looking at examples in the documentation for getting the scale I want.

• Hello, there are many useful options for Plot. Take a look at PlotRange, AspectRatio, ImageSize.You may also be interested in this topic: How to manimpulate 2D plots.
– Kuba
Jan 27, 2014 at 5:52

Mathematica unfortunately does not have the same zooming features that Matlab plot has. In 3D one can zoom using the mouse. In 2D can can only enlarge or reduce the size of the overall plot using the mouse. But nothing build-in like Matlab's zooming into specific area in the plot with the mouse. May be in V 10 Mathematica will add this feature, which is very important and missing now.

So, other than having to redo the plot each time and change the options (plotrange, etc..), it is not hard to make a quick Manipulate to do all this yourself. Here is a quick example

Manipulate[
Plot[x^3, {x, -5, 5}, PlotRange -> {{-xRange, xRange}, {-yRange, yRange}},
ImagePadding -> 30, ImageSize -> 300, Frame -> True],
{{xRange, 5, "x limit?"}, 1, 5, .1},
{{yRange, 5, "y limit?"}, 1, 100, 1}
]


Now you can move the range for x and y and the plot will update.

• Thank you, it solves my problem. I am new to Mathematica, and do you know of any good books that would give me a solid foundation on using Mathematica?
– GAL
Jan 27, 2014 at 6:14