Skip to content

[BUG] No ylabel unit label in twinx  #4741

@ivan-boikov

Description

@ivan-boikov

Details

When adding a twinx plot with Unitful y values a corresponding unit label is not added.

using Plots, Unitful
plot([0,1]u"s", [0,1]u"m");
twinx()
plot!([0.1,0.5]u"s", [0.1,0.4]u"m")

GR example:
image

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pythonplot x
plotlyjs x (no units at all)
pgfplotsx x (crash)
unicodeplots x (no twinx?)
inspectdr x (no twinx?)
gaston x

Versions

Plots.jl version: 1.38.11
Backend version (]st -m <backend(s)>):

GR: 0.72.4
PythonPlot: 1.0.2
PGFPlotsX: 1.5.3
PlotlyJS: 0.18.10
UnicodePlots: 3.5.2
InspectDR: 0.4.3

Output of versioninfo():

Commit afb6c60d69a (2022-09-06 15:09 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 12 × AMD Ryzen 5 3600 6-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver2)
Threads: 1 on 12 virtual cores
Environment:
JULIA_DEPOT_PATH = /home/ivan/.local/share/julia

Metadata

Metadata

Assignees

No one assigned

    Labels

    UnitfulExtrecipes for Unitful quantitiesbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions