Array Types

Source code Author Update time

using Plots

Plots supports different Array types that follow the AbstractArray interface, like StaticArrays and OffsetArrays.

using StaticArrays, OffsetArrays
sv = SVector{10}(rand(10))
ov = OffsetVector(rand(10), -2)
plot(Any[sv, ov], label = ["StaticArray" "OffsetArray"])
plot!(3ov, ribbon = ov, label = "OffsetArray ribbon")
Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 0.0 2.5 5.0 7.5 10.0 StaticArray OffsetArray OffsetArray ribbon gnuplot_plot_4a StaticArray StaticArray OffsetArray OffsetArray OffsetArray ribbon OffsetArray ribbon gnuplot_plot_4a

This page was generated using DemoCards.jl and Literate.jl.