Bar plot customizations

Source code Author Update time

using Plots
pythonplot()

Width of bars may be specified as bar_width. The bars' baseline may be specified as fillto. Each may be scalar, or a vector specifying one value per bar.

plot(bar([-1, 0, 2, 3], [1, 3, 6, 2], fill_z = 4:-1:1, alpha = [1, 0.2, 0.8, 0.5], label = "", bar_width = 1:4), bar(rand(5), bar_width = 1.2, alpha = 0.8, color = [:lightsalmon, :tomato, :crimson, :firebrick, :darkred], fillto = 0:-0.1:-0.4, label = "reds"))
2023-08-30T09:54:18.765534 image/svg+xml Matplotlib v3.7.2, https://matplotlib.org/

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