Skip to content

Commit

Permalink
improve dense plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Feb 5, 2017
1 parent 9e763ee commit 8b22d5f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/solutions/solution_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ end
=#

@recipe function f(sol::DESolution;
plot_analytic=false,denseplot=true,plotdensity=10*length(sol),vars=nothing)

if typeof(sol) <: AbstractSDESolution
denseplot = false
end
plot_analytic=false,
denseplot = (sol.dense || typeof(sol.prob) <: AbstractDiscreteProblem) && !(typeof(sol) <: AbstractSDESolution),
plotdensity=typeof(sol.prob) <: AbstractDiscreteProblem ? 100*length(sol) : 10*length(sol),vars=nothing)

int_vars = interpret_vars(vars,sol)

if denseplot && sol.dense
if denseplot
# Generate the points from the plot from dense function
plott = collect(Ranges.linspace(sol.t[1],sol.t[end],plotdensity))
plot_timeseries = sol(plott)
Expand Down

0 comments on commit 8b22d5f

Please sign in to comment.