Skip to content

The label of the second y axis on the right is partially missing #2636

@hurricane007

Description

@hurricane007

Hello,
there is one strange behavior when plotting the second y-axis. for example, the code below gives a figure whose right y label is partially cut.

using Plots, LaTeXStrings
a = 1:10
b = rand(10)
plot(a,b, label = "randData", ylabel = "Rand data",color = :red, 
    legend = :topleft, grid = :off, xlabel = "numbers")
p = twinx()
plot!(p,a,log.(a), label = L"log(x)", legend = :topright, 
     box = :on, grid = :off, ylabel = "y label 2")

image
However, if we added a savefig after, the second y label magically shown up.
Does anyone know what is the reason?
In addition, is it possible to add an example of drawing the second y-axis in the tutorial?
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions