-plot!(sol2; label="sol2", linestyle=:dash)</code></pre><img src="manual-plot-30cfaa37.svg" alt="Example block output"/><h2 id="manual-plot-control"><a class="docs-heading-anchor" href="#manual-plot-control">Plotting the control norm</a><a id="manual-plot-control-1"></a><a class="docs-heading-anchor-permalink" href="#manual-plot-control" title="Permalink"></a></h2><p>For some problem, it is interesting to plot the (Euclidean) norm of the control. You can do it by using the <code>control</code> optional keyword argument with <code>:norm</code> value.</p><pre><code class="language-julia hljs">plot(sol; control=:norm, size=(800, 300), layout=:group)</code></pre><img src="manual-plot-5e4c1482.svg" alt="Example block output"/><p>The default value is <code>:components</code>.</p><pre><code class="language-julia hljs">plot(sol; control=:components, size=(800, 300), layout=:group)</code></pre><img src="manual-plot-4f358e6a.svg" alt="Example block output"/><p>You can also plot the control and is norm.</p><pre><code class="language-julia hljs">plot(sol; control=:all, layout=:group)</code></pre><img src="manual-plot-821474a9.svg" alt="Example block output"/><h2 id="manual-plot-custom"><a class="docs-heading-anchor" href="#manual-plot-custom">Custom plot and subplots</a><a id="manual-plot-custom-1"></a><a class="docs-heading-anchor-permalink" href="#manual-plot-custom" title="Permalink"></a></h2><p>You can, of course, create your own plots by extracting the <code>state</code>, <code>costate</code>, and <code>control</code> from the optimal control solution. For instance, let us plot the norm of the control.</p><pre><code class="language-julia hljs">using LinearAlgebra
0 commit comments