When solving differential equations and plotting the results, how can I increase the number of data points that are plotted? I have
using DifferentialEquations
using Plots
function lorenz(du,u,p,t)
du[1] = 10.0*(u[2]-u[1])
du[2] = u[1]*(28.0-u[3]) - u[2]
du[3] = u[1]*u[2] - (8/3)*u[3]
end
u0 = [5.0;0.0;0.0]
tspan = (0.0,100000.0)
prob = ODEProblem(lorenz,u0,tspan)
sol = solve(prob)
plot(sol, vars = 1, xlims = (10,100000),xscale =:log)
Specifically, when using something like PyPlots I can use:
x = linspace(0,100000,num=10000)
where I set num = 10000 which increases the number of samples and allows for a higher resolution of data points for longer integration timespans.
The obvious answer is to use PyPlots, but I'm not sure if I can even use PyPlots with the DifferentialEquations package. It would be nice to know how this is done for Plots. (As depending on the function, some plots come out very jagged).