With the StatsPlots
package (not with Makie
or other packages), I would like to change the background colour of fillstyle
, where it has :+
, :|
, and etc. Is there any way? Alternatively, I wrote the following code which draw two overlapping bar graphs, but the problem is I cannot change the fillings in legend.
using StatsPlots
gr()
bar_group = 1:3
bar_data = [rand(3) rand(3) rand(3) rand(3) rand(3) rand(3) rand(3) rand(3) rand(3)]
gb = groupedbar(bar_group, bar_data, bar_position =:stack, bar_width = 0.5,
label=[ "item1" "item2" "item3" "item4" "item5" "item6" "item7" "item8" "item9"],
fillcolor=[:black :darkgray :lightgray :black :darkgray :lightgray :black :darkgray :lightgray])
groupedbar!(bar_group, bar_data, bar_position =:stack, bar_width = 0.5, label=false,
fillcolor=:black, fillalpha=0.5, fillstyle=[nothing nothing nothing :| :- :+ :/ :\ :x])
plot!(legend=:outerbottom, legendcolumns=3, legend_font_halign=:right)
display(gb)