# Why is the y axis label horizontal

**URL:** <https://discourse.julialang.org/t/why-is-the-y-axis-label-horizontal/37681>\
**Category:** General Usage\
**Created:** [April 16, 2020, 5:05am UTC](https://discourse.julialang.org/t/why-is-the-y-axis-label-horizontal/37681 "2020-04-16T05:05:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lewis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lewis/32/5217_2.png) [@lewis](https://discourse.julialang.org/u/lewis)\
**Post date:** [April 16, 2020, 5:05am UTC](https://discourse.julialang.org/t/why-is-the-y-axis-label-horizontal/37681/1 "2020-04-16T05:05:57Z")

</div>

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:

```julia
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:

 ![bad_y_axis_label](https://global.discourse-cdn.com/julialang/original/3X/e/7/e7abd3954dee1cf9cd292d4b53f55136851fa013.png)

How it used to be:

 ![Cleveland doublebump case 1](https://global.discourse-cdn.com/julialang/original/3X/e/e/ee20bb7f1018bc726be30f144c1092bf85eb89a3.png)

---

<div class="post-metadata">

**Author:** ![lewis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lewis/32/5217_2.png) [@lewis](https://discourse.julialang.org/u/lewis)\
**Post date:** [April 16, 2020, 5:13am UTC](https://discourse.julialang.org/t/why-is-the-y-axis-label-horizontal/37681/2 "2020-04-16T05:13:02Z")

</div>

Works as expected with the gr background. All I did was change pyplot() to gr() so I think the Plots code should produce the intended result (very open to any suggestions, though).

But, gr won’t allow the `reuse=false` option. As of December 2019 there was no plan to implement this. I want to be able to produce a 2-4 plots and keep them open for comparison.

PlotlyJS scares me with all its many dependencies.

---

<div class="post-metadata">

**Author:** ![lewis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lewis/32/5217_2.png) [@lewis](https://discourse.julialang.org/u/lewis)\
**Post date:** [April 16, 2020, 5:24am UTC](https://discourse.julialang.org/t/why-is-the-y-axis-label-horizontal/37681/3 "2020-04-16T05:24:42Z")

</div>

Just updated Plots. It’s fixed!

I have something very cool I did with plots that I’ll post. Everyone needs a “hey look how great this worked” post everyone once in a while. I will post it tomorrow.

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [April 16, 2020, 5:39am UTC](https://discourse.julialang.org/t/why-is-the-y-axis-label-horizontal/37681/4 "2020-04-16T05:39:58Z")

</div>

To rotate only either x or y, the keyword is `xrotation / yrotation`

---

<div class="post-metadata">

**Author:** ![lewis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lewis/32/5217_2.png) [@lewis](https://discourse.julialang.org/u/lewis)\
**Post date:** [April 16, 2020, 4:52pm UTC](https://discourse.julialang.org/t/why-is-the-y-axis-label-horizontal/37681/5 "2020-04-16T16:52:40Z")

</div>

Guess I need to use plotattr() to see everything as the doc doesn’t always keep up.
