Plots.jl
Plots.jl copied to clipboard
[BUG] Buggy `link` behavior
Details
link
only links the first two subplots. Furthermore, using layout
breaks it.
x = range(1, 10, 10)
y = range(1, 5, 10)
z = range(1, 2, 10)
plot(plot(x), plot(y), plot(z), link=:y)
plot(plot(x), plot(y), plot(z), link=:y, layout=(3,1))
Backends
This bug occurs on ( insert x
below )
Backend | yes | no | untested |
---|---|---|---|
gr (default) | x | ||
pythonplot | x | ||
plotlyjs | x | ||
pgfplotsx | x | ||
unicodeplots | x | ||
inspectdr | x | ||
gaston | x |
Versions
Plots.jl version: Plots v1.38.17
Backend version (]st -m <backend(s)>
): GR v0.72.9
Output of versioninfo()
:
Julia Version 1.9.2
Commit e4ee485e90 (2023-07-05 09:39 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 32 × 13th Gen Intel(R) Core(TM) i9-13900K
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, goldmont)
Threads: 24 on 32 virtual cores
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 24
Correct me if I'm wrong, but isn't this documented behavior? link=:y
links the y axes in each column. When you specify layout=(3, 1)
there is only one column, and so there are no other y axes to link. Specifying link=:all
links all axes in all subplots.
With that said, it would be nice to be able to link the y axes in all subplots without also having to link the x axes. Is there a way of doing that without manually providing ylims for each subplot?
Yes, I guess that at the time I thought it is supposed to do the latter. It would be nice to be able to link whatever axis across any subset of subplots.