Plots.jl icon indicating copy to clipboard operation
Plots.jl copied to clipboard

[BUG] twinx() doesn't work nicely with framestyle and ticks

Open kosukesando opened this issue 8 months ago • 0 comments

Details

  1. Using twinx without specifying framestyle, the ticks are duplicated onto the left
  2. Using twinx causes GR to not respect framestyle, but (kind of) fixes issue 1

I have a suspicion this has something to do with the "ticks on all four sides" FR

  • No framestyle specified (notice weird ticks on left) image

  • :box for both axis (notice weird ticks on left) image

  • :semi for both axis (a grey border is visible on top, unlike other combinations) image

  • :box for main, :semi for twinx (ticks are okay but the :box is not respected) image

In my limited testing it seems specifying the :semi for the twinx fixes the duplicate ticks, but the framestyle for the main axis is somewhat overridden by default. I'm not sure if this is expected behavior, at least the documentation doesn't mention anything about this.

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: v1.40.4 Backend version (]st -m <backend(s)>): v0.73.5+0 Output of versioninfo():

Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 PRO 7730U with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)
Environment:
  JULIA_PKG_USE_CLI_GIT = true

kosukesando avatar Jun 25 '24 08:06 kosukesando