JuliaPlots/Plots.jl

[BUG] Unicodeplots-Histogram lines in wrong color

Open

#4509 aperta il 11 nov 2022

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Julia (381 fork)batch import
UnicodePlotsbughelp wanted

Metriche repository

Star
 (1943 star)
Metriche merge PR
 (Merge medio 13g 6h) (2 PR mergiate in 30 g)

Descrizione

Details

I was just using the Unicdoeplots backend to create a figure with 2 subplots (since this is unsupported by Unicodeplots itself if I am not mistaken?) containing histograms. However, apparently the histogram creation doesn't take into account the background color settings of the used terminal. To be more precise, I can't see the lines in my black-background terminal unless I highlight the parts (see screenshots). I think the easiest way to fix this would be to create the lines using the defaultcolor of the terminal instead of using black. As a workaround I currently use linecolor to set it manually, which seems to be the only keyword changing the colors of the line. However I am then not able to independently change the colors of the markers (i.e. the circles).

Following pictures are created with:

using Plots
unicodeplots()

plaq = ... # some data
trsigma = ... # some data


plot(histogram(plaq,label="",color=:green,bins=20),histogram(trsigma,label="",bins=20,color=:green), layout=(1,2))

Current behaviour:

Histograms highlighted:

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pyplot x
plotlyjs x
pgfplotsx x
unicodeplots x
inspectdr x
gaston x

Versions

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

      Status `~/tmp/Manifest.toml`
  [91a5bcdd] Plots v1.36.0
  [b8865327] UnicodePlots v3.2.1

Output of versioninfo():

Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin21.4.0)
  CPU: Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
  JULIAPATH = /Applications/Julia-1.7.app/Contents/Resources/julia

Guida contributor