For weeks this worked. I haven’t touched the plot function. Suddenly, the y axis label is horizontal instead of vertical. guidefontrotation changes both the x axis and y axis labels. So, that won’t work.
Yes, I added PlotThemes (like it a lot) and for the first few days the y axis label was vertical.
Not sure what happened or how to get it back.
Thanks.
Plot code:
function cumplot(dseries, locale, plseries=[:Unexposed,:Infectious,:Recovered, :Dead];
geo=[])
pyplot()
theme(:ggplot2, foreground_color_border =:black, reuse = false)
!(typeof(plseries) <: Array) && (plseries = [plseries])
# the data
n = size(dseries[locale][:cum],1)
cumseries = Matrix([DataFrame(Day = 1:n) dseries[locale][:cum][!,plseries]])
labels = string.(plseries)
labels = reshape([labels...], 1, length(labels))
people = dseries[locale][:cum][1,:Unexposed] + dseries[locale][:cum][1,:Infectious]
cityname = !isempty(geo) ? geo[locale, city] : ""
died = dseries[locale][:cum][end,:Dead]
infected = dseries[locale][:cum][1,:Unexposed] - dseries[locale][:cum][end,:Unexposed]
firstseries = plseries[1]
half_yscale = floor(Int, maximum(dseries[locale][:cum][!,firstseries]) * 0.5)
# the plot
plot( cumseries[:,1], cumseries[:,2:end],
size = (700,500),
label = labels,
lw=2.3,
title = "Covid for $people people in $cityname over $n days\nActive Cases for Each Day",
xlabel = "Simulation Days",
ylabel = "People",
legendfontsize = 10,
reuse = false
)
annotate!((6,half_yscale,Plots.text("Died: $died\nInfected: $infected", 10, :left)))
end
How it is now:
How it used to be: