Working with Plots

CedarEDA provides a few convenience methods for working with plots (such as explore() and inspect()), however all plots are powered by the opensource Makie.jl package which provides high-quality graphics with a number of possible backends. CedarEDA uses the WGLMakie backend by default to provide interactive plots within your webbrowser, however other popular backends such as CairoMakie can be used for static image output in many formats.

Interacting with plots

Makie interactive plots can be interacted with in the following ways:

  • Right-click drag to pan, ctrl+click to reset view
  • Left-click drag to zoom, ctrl+click to reset view
  • Left-click drag while holding x to zoom only along the X-axis
  • Left-click drag while holding y to zoom only along the Y-axis
  • Left-click drag sliders to adjust values
Further Makie Documentation

For more details on the interactions available by default in interactive Makie plots, see the Axis documentation upstream.

Saving figures to disk

When using the default WGLMakie backend, saving to .png is straightforward, simply use the WGLMakie.save() function:

fig = explore(sp)

using WGLMakie
save("output.png", fig)

To save into more exotic formats, you must use a different backend, such as CairoMakie:

using CairoMakie
CairoMakie.activate!()
save("output.svg", fig)

CedarEDA convenience methods

CedarEDA provides the following convenience methods:

CedarEDA.exploreFunction
explore(sp::SimParameterization)

explore(sp) with no solution passed in will default to explore(sp, tran!(sp)), see the documentation for the explore(sp, ::TransientSolutionType) method for more details.

explore(sp::SimParameterization, ss::SensitivitySolutionType; with_transient = true)

Display a figure exploring the sensitivity results from a sensitivities!() call. If with_transient is set to true, also displays the transient solution. If solved across a parameter sweep, sliders allow exploration of the sensitivities across different points along the sweep.

explore(sp::SimParameterization, ts::TransientSolutionType)

Display a figure exploring the sensitivity results from a tran!() call. If solved across a parameter sweep, sliders allow exploration of the transients across different points along the sweep.

explore(sp::SimParameterization, as::ACSolutionType)

Display a figure exploring the frequency response results from an ac!() call. If solved across a parameter sweep, sliders allow exploration of the frequency response across different points along the sweep.

explore(sp::SimParameterization, as::NoiseSolutionType)

Display a figure exploring the frequency response results from a noise!() call. If solved across a parameter sweep, sliders allow exploration of the frequency response across different points along the sweep.