I’m trying to plot the trajectory of an object falling in a central gravitational potential well. The plot is obtained using the relation between
θ by running the following code in the Jupyter notebook:
using Plots ε = 1.0; k = 0.2 s(θ) = 1/k*(1+ε*cos(θ)) plot(θ -> 1/s(θ), 0, 2π, proj=:polar, lims=(0, 15))
ε = 1.0, the trajectory has to be a parabola.
The problem is with the
lims parameter of the
plot function. When setting
lims=(0, 15), I get a good plot of a parabola. However, if I set the upper limit to a smaller value (
lims=(0, 10) for example) in order to zoom-in on the part of the plot close to the origin, the parabola disappears and I only get two little dashes at the edge of the graph.
Any ideas on what is causing this problem and how mitigate it?
Many thanks in advance!