Skip to content

Commit

Permalink
Add Bifurcations.plot as a workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Jun 21, 2018
1 parent a6e5c8d commit c2c34df
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ function warn_include_points(include_points)
warn("""include_points = true is set.
Note that it is known to disturb line styles and colors
such that stability information is wrongly plotted.
As a workaround, use:
Bifurcations.plot(sweep)
Bifurcations.plot(sol)
Bifurcations.plot(solver)
""")
end
end
Expand Down Expand Up @@ -151,3 +155,21 @@ end
end
end
end

function plot(plottable::Union{Codim1Sweep,
Codim1Solution,
Codim1Solver};
resolve_points = plottable isa Codim1Solver,
include_points = true,
kwargs...)
plt = Main.Plots.plot()
for point in maybe_get_points(plottable, include_points, resolve_points)
Main.Plots.plot!(plt, point)
end
Main.Plots.plot!(plt, plottable;
include_points = false,
kwargs...)
return plt
end

plot(args...; kwargs...) = Main.Plots.plot(args...; kwargs...)

0 comments on commit c2c34df

Please sign in to comment.