I am using this stacked bar plot example to create a stacked bar plot with a percentage axis. Here is some reproducible code:
using StatsPlots
measles = [38556, 24472, 14556, 18060, 19549, 8122, 28541, 7880, 3283, 4135, 7953, 1884]
mumps = [20178, 23536, 34561, 37395, 36072, 32237, 18597, 9408, 6005, 6268, 8963, 13882]
chickenPox = [37140, 32169, 37533, 39103, 33244, 23269, 16737, 5411, 3435, 6052, 12825, 23332]
ticklabel = string.(collect('A':'L'))
groupedbar([measles mumps chickenPox],
bar_position = :stack,
bar_width=0.7,
xticks=(1:12, ticklabel),
label=["measles" "mumps" "chickenPox"])
Output:
So now it is a nice stacked values barplot, but I would like to make the y-axis in percentage with range from 0 to 100%. Unfortunately there is no option like scale = :percent
. So I was wondering if anyone knows how to make this barplot with percentage y-axis in Julia
?