Bar plot customizations

Source code Author Update time

using Plots
gaston()

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"))
Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 gnuplot_plot_1a gnuplot_plot_2a gnuplot_plot_3a gnuplot_plot_4a gnuplot_plot_5a gnuplot_plot_6a gnuplot_plot_7a gnuplot_plot_8a -0.4 -0.2 0.0 0.2 0.4 0.6 1 2 3 4 5 reds gnuplot_plot_2b gnuplot_plot_3b gnuplot_plot_4b gnuplot_plot_5b gnuplot_plot_6b gnuplot_plot_7b gnuplot_plot_8b gnuplot_plot_9b gnuplot_plot_10b reds reds gnuplot_plot_2b gnuplot_plot_3b gnuplot_plot_4b gnuplot_plot_5b gnuplot_plot_6b gnuplot_plot_7b gnuplot_plot_8b gnuplot_plot_9b gnuplot_plot_10b

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