y errorbar with colormap

using CairoMakie, Random

Random.seed!(145)
x, y = 1:2:20, 5 * rand(10)
yerr, xerr = 0.4 * abs.(randn(10)), abs.(randn(10))
fig = Figure(resolution = (600, 400), fonts = (; regular= "sans"))
ax = Axis(fig[1, 1], xlabel = "variable", ylabel = "values", xgridstyle = :dash,
    ygridstyle = :dash)
errorbars!(ax, x, y, yerr; whiskerwidth = 12, color = yerr,
    linewidth = 2, colormap = :viridis)
scatter!(ax, x, y; color = yerr, colormap = :viridis, markersize = 15)
fig

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.