Twin Axis

using CairoMakie

fig = Figure(resolution = (600, 400))
ax1 = Axis(fig[1, 1], yticklabelcolor = :black, rightspinevisible = false)
ax2 = Axis(fig[1, 1], yaxisposition = :right,
    yticklabelcolor = :dodgerblue,
    rightspinecolor = :dodgerblue,
    ytickcolor = :dodgerblue)
lines!(ax1, 0 .. 10, x -> x; color = :black)
lines!(ax2, 0 .. 10, x -> exp(-x); color = :dodgerblue)
hidespines!(ax2, :l, :b, :t)
hidexdecorations!(ax2);

Warning

This example was autogenerated using:

using Pkg
Pkg.status("CairoMakie")
Status `~/work/BeautifulMakie/BeautifulMakie/docs/Project.toml`
  [13f3f980] CairoMakie v0.10.6

This page was generated using Literate.jl.