Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/examples/classical_physics.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ plot(sol, linewidth = 2, title = "Simple Pendulum Problem", xaxis = "Time",
So now we know that behaviour of the position versus time. However, it will be useful to us to look at the phase space of the pendulum, i.e., and representation of all possible states of the system in question (the pendulum) by looking at its velocity and position. Phase space analysis is ubiquitous in the analysis of dynamical systems, and thus we will provide a few facilities for it.

```@example physics
p = plot(sol, idxs = (1, 2), xlims = (-9, 9), title = "Phase Space Plot",
xaxis = "Velocity", yaxis = "Position", leg = false)
p = plot(sol, vars = (1, 2), xlims = (-9, 9), title = "Phase Space Plot",
xaxis = "Angular position", yaxis = "Angular velocity", leg = false)
function phase_plot(prob, u0, p, tspan = 2pi)
_prob = ODEProblem(prob.f, u0, (0.0, tspan))
sol = solve(_prob, Vern9()) # Use Vern9 solver for higher accuracy
Expand Down
Loading