Visualization

Cropbox.plotFunction
plot(df::DataFrame, x, y; <keyword arguments>) -> Plot
plot(X::Vector, Y::Vector; <keyword arguments>) -> Plot
plot(df::DataFrame, x, y, z; <keyword arguments>) -> Plot

Plot a graph from provided data source. The type of graph is selected based on arguments.

See also: plot!, visualize

source
plot(v::Number; kind, <keyword arguments>) -> Plot
plot(V::Vector; kind, <keyword arguments>) -> Plot

Plot 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.

See also: plot!, visualize

source
Cropbox.plot!Function
plot!(p, <arguments>; <keyword arguments>) -> Plot

Update 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; nothing creates a new plot.
source
Cropbox.visualizeFunction
visualize(<arguments>; <keyword arguments>) -> Plot

Make 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)
source
Cropbox.visualize!Function
visualize!(p, <arguments>; <keyword arguments>) -> Plot

Update 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; nothing creates a new plot.
source
Cropbox.manipulateFunction
manipulate(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 configuration c is provided.
  • parameters: parameters adjustable with interactive widgets; value should be an iterable.
  • config=(): a baseline configuration.
source
manipulate(args...; parameters, kwargs...)

Create an interactive plot by calling manipulate with visualize as a callback.

See also: visualize

Arguments

  • args: positional arguments for visualize.
  • parameters: parameters for manipulate.
  • kwargs: keyword arguments for visualize.
source