Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Prepare data then plot

Plot{Plots.GRBackend() n=1}

Line plots connect the data points

Plot{Plots.GRBackend() n=1}

Scatter plots show the data points only

Plot{Plots.GRBackend() n=1}

you can trace functions directly

Plot{Plots.GRBackend() n=1}

Trace a function within a range

Plot{Plots.GRBackend() n=1}

Customization example

Plot{Plots.GRBackend() n=1}

Multiple series: each row is one observation; each column is a variable.

Plot{Plots.GRBackend() n=2}

Plotting two functions with customizations

Plot{Plots.GRBackend() n=2}

Building the plot in multiple steps in the object-oriented way

Plot{Plots.GRBackend() n=2}

Parametric plot

Plot{Plots.GRBackend() n=1}

Subplots

Plot{Plots.GRBackend() n=2}

Subplot layout

Plot{Plots.GRBackend() n=2}

Vector field

Plots.jl

# Quiver plot
quiver(vec(x2d), vec(y2d), quiver=(vec(vx2d), vec(vy2d))

# Or if you have a gradient function ∇f(x,y) -> (vx, vy)
quiver(x2d, y2d, quiver=∇f)

∇ = \nabla <TAB>

#5 (generic function with 1 method)

x and y grid points

200-element LinRange{Float64, Int64}: -2.0, -1.9799, -1.9598, -1.9397, …, 1.9196, 1.9397, 1.9598, 1.9799, 2.0

stream object

StreamlineData{2}: 105 streamlines, 36392 points, domain [-2.0, 2.0] × [-2.0, 2.0]

Stream plot

Plot{Plots.GRBackend() n=2}

Save figure

savefig([fig_obj,] filename)

Save the current figure

"/home/github/actions-runner-1/_work/mmsb-bebi-5009/mmsb-bebi-5009/docs/vector-field.png"

Save the figure fig

"/home/github/actions-runner-1/_work/mmsb-bebi-5009/mmsb-bebi-5009/docs/subplots.png"

This notebook was generated using Literate.jl.