Twinx shows left yticks on right y axis

I am struggling to generate a plot with two y-axes. The left y-ticks show up on the right y-axis. Also, I am uisng rightmargin =, box = :on because the label margins are broken.

using Plots


plot(rand(10), leg=false, ylims=(-.1,1), framestyle=:box, rightmargin =, box = :on)

plot!(twinx(), leg=false, 100*rand(10), ylims=(0,100), ylabel="right")

Using the GR backend works in this simple example, but it breaks in my code. Are there any other ways to fix the axis? Is this a bug that should be reported?

1 Like