Array Types

Source code Author Update time

using Plots
unicodeplots()

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")
┌────────────────────────────────────────┐ 3.24123 │⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ StaticArray │⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ OffsetArray │⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ OffsetArray ribbon │⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ │⠀⠀⡠⠔⢹⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ │⠀⠉⠀⠀⢸⠱⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ │⠀⠀⠀⠀⢸⠀⠱⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ │⠀⠀⠀⠀⢸⠀⠀⢣⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ │⠀⠀⠀⠀⢸⠀⠀⠀⠑⢄⠀⠀⠀⠀⠀⠀⡔⠁⠈⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ │⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠉⠒⠒⠤⠤⠊⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ │⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⠀⠀⠀⢀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⠀│ │⠀⠤⠔⠒⢺⠢⣀⠀⢀⣀⣀⣀⠤⠔⠊⠒⠤⢄⣀⠀⠈⢆⡠⢔⠥⢞⢄⠀⠀⠀⠀⠀⠀⠀⢀⠏⠉⠀⠀⠀│ │⠀⠀⠀⠀⢸⠀⠀⠹⠥⢄⣀⠀⠀⠀⠀⣀⡠⠔⠢⡉⠒⠪⠊⠁⠀⠈⢪⢆⠀⠀⠀⠀⠀⢀⠎⠀⠀⠀⠀⠀│ │⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠀⠀⠀⠀⠈⠢⢄⣀⠤⠤⠢⣀⢫⢢⠤⠤⠤⢀⠎⠀⠀⠀⠀⠀⠀│ -0.0337874 │⣀⣀⣀⣀⣸⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣉⣳⣶⣶⣶⣎⣀⣀⣀⣀⣀⣀⣀│ └────────────────────────────────────────┘ ⠀-1.33⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀10.33⠀

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