Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] scatter plot ignores alpha #3753

Closed
mcabbott opened this issue Aug 15, 2021 · 4 comments
Closed

[BUG] scatter plot ignores alpha #3753

mcabbott opened this issue Aug 15, 2021 · 4 comments
Labels

Comments

@mcabbott
Copy link

mcabbott commented Aug 15, 2021

Details

Scatter plots seem to ignore alpha for me, example below. Line plots are fine.

This is on an M1 mac, with the native Julia nightly.

I am today unable to get Plots + GR working at all on Julia 1.6 + rosetta, although at some point I thought I managed, perhaps with a particular older version pinned. Edit: from here JuliaLang/julia#36617 (comment), ] add [email protected] is one version which works under rosetta, for which this problem does not occur. I can't run that version natively, though.

Plots.plot(rand(30,5), alpha=0.5, line=10)  # this has opacity

Plots.scatter!(30*rand(30), rand(30), ms=50*rand(30), alpha=0.5, c=rand(1:3, 30))  # this does not

Screenshot 2021-08-15 at 17 18 03

Edit -- The problem also doesn't show up in the saved PNG file:

savefig("scatter_test.png")  # this file has transparency, correctly
savefig("scatter_test.pdf")  # likewise fine.

It does not occur when using GR directly:

using GR

GR.scatter(rand(30), rand(30), 4000*rand(30), rand(1:50:250, 30), alpha=0.5)  # works fine

Backends

This bug occurs on ( insert x below )

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

Versions

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

(jl_HQfA5O) pkg> st
      Status `/private/var/folders/yq/4p2zwd614y59gszh7y9ypyhh0000gn/T/jl_HQfA5O/Project.toml`
  [28b8d3ca] GR v0.58.1
  [91a5bcdd] Plots v1.20.1

Output of versioninfo():

julia> versioninfo()
Julia Version 1.8.0-DEV.322
Commit e87e30c0e3 (2021-08-09 11:15 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin20.6.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)
Environment:
  JULIA_NUM_THREADS = 4
@BeastyBlacksmith
Copy link
Member

FWIW that code is fine on Ubuntu20.04

@mcabbott
Copy link
Author

It also seems fine when I save to disk. I've edited text above to mention this.

@t-bltg
Copy link
Member

t-bltg commented Nov 20, 2022

I can't reproduce on GKS term (which is the OP issue).

@t-bltg t-bltg closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2022
@mcabbott
Copy link
Author

Works for me locally too, Plots v1.36.2. Thanks for checking, I had forgotten about this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants