# How to define step size of y axis in mathematica plot [closed]

I want to plot the following function.

f(r) = 1 - $$\frac{10}{r}$$ e$$^{-\frac{0.7^2}{10 r}}$$.

I can specify x-axis range using

Plot[f[r],{r,0,20}]


For the above input, in the output, mathematica is showing a plot in which y axis range is from 1 to -5, with step size of 1. I want y axis range from 1 to -30 with step size of 5. How to do that ?

It's not the "stepsize", try PlotRange

f[r_] := 1 - 10/r Exp[-( 7^2/(1000 r ))]
Plot[f[r], {r, 0, 20}, PlotRange -> {-30, 1}] • Thanks. It automatically came as I wanted. But I want to know how to do it manually. Forex, here on y-axis, the interval automatically came in units of 5. What if I want it in units of 10?
– apk
Jun 5 at 16:34
• If you want to change the spacing of the ticks on the y-axis from 5 to 10, you can use the Ticks option: Plot[f[r], {r, 0, 20}, PlotRange -> {-30, 1}, Ticks -> {Automatic, Range[-30, 1, 10]}] ticks documentation
– ydd
Jun 5 at 17:27
• I want to change the scaling. The distance, which is 5 units on the y-axis, I want the same distance to be 10 units.
– apk
Jun 5 at 18:34
• I am not sure what you mean. Do you want to the plot graphic to be half as tall as it is now relative to its width so that the same vertical distance on the screen is now 10 units instead of 5? In this case you can use the AspectRatio option.
– ydd
Jun 5 at 21:44