Visualization
Cropbox.plot — Functionplot(df::DataFrame, x, y; <keyword arguments>) -> Plot
plot(X::Vector, Y::Vector; <keyword arguments>) -> Plot
plot(df::DataFrame, x, y, z; <keyword arguments>) -> PlotPlot a graph from provided data source. The type of graph is selected based on arguments.
plot(v::Number; kind, <keyword arguments>) -> Plot
plot(V::Vector; kind, <keyword arguments>) -> PlotPlot a graph of horizontal/vertical lines depending on kind, which can be either :hline or :vline. An initial plotting of hline requires xlim and vline requires ylim, respectively.
Cropbox.plot! — Functionplot!(p, <arguments>; <keyword arguments>) -> PlotUpdate an existing Plot object p by appending a new graph made with plot.
See also: plot
Arguments
p::Union{Plot,Nothing}: plot object to be updated;nothingcreates a new plot.
Cropbox.visualize — Functionvisualize(<arguments>; <keyword arguments>) -> PlotMake a plot from an output collected by running necessary simulations. A convenient function to run both simulate and plot together.
See also: visualize!, simulate, plot, manipulate
Examples
julia> @system S(Controller) begin
a(a) => a ~ accumulate(init=1)
end;
julia> visualize(S, :time, :a; stop=5, kind=:line)
┌────────────────────────────────────────┐
32 │ :│
│ : │
│ : │
│ : │
│ : │
│ : │
│ : │
a │ : │
│ .' │
│ .' │
│ .' │
│ ..' │
│ ..'' │
│ ....'' │
1 │.........'''' │
└────────────────────────────────────────┘
0 5
time (hr)Cropbox.visualize! — Functionvisualize!(p, <arguments>; <keyword arguments>) -> PlotUpdate an existing Plot object p by appending a new graph made with visualize.
See also: visualize
Arguments
p::Union{Plot,Nothing}: plot object to be updated;nothingcreates a new plot.
Cropbox.manipulate — Functionmanipulate(f::Function; parameters, config=())Create an interactive plot updated by callback f. Only works in Jupyter Notebook.
Arguments
f::Function: callback for generating a plot; interactively updated configurationcis provided.parameters: parameters adjustable with interactive widgets; value should be an iterable.config=(): a baseline configuration.
manipulate(args...; parameters, kwargs...)Create an interactive plot by calling manipulate with visualize as a callback.
See also: visualize
Arguments
args: positional arguments forvisualize.parameters: parameters formanipulate.kwargs: keyword arguments forvisualize.