Open knuesel opened 2 years ago
This will be slightly trickier to solve in a clean way. Makie support alpha
transparency for continuous color directly in the colormap
attribute, so visual(colormap=(:batlow, 0.5))
should work. It should be feasible to get this to work by default.
Thanks for the workaround with colormap
! Though it's annoying in my case that the colorbar is also affected:
df = (x=vec((1:3) .+ rand(200)'),
y=vec((1:3) .+ rand(200)'),
c=vec([1,2,5] .+ rand(200)'))
plt = data(df) * mapping(:x, :y, color=:c) * visual(colormap=(:viridis, 0.3))
draw(plt, axis=(width=300, height=200))
@knuesel Have you since figured out a way to prevent the colorbar from being affected? I'm trying a similar plot.
@czimm79 no for now I'm just not using transparency in those plots with continuous color scale.
just to say the original example works for me now; I'm on
AlgebraOfGraphics v0.6.12
CairoMakie v0.9.4
Makie v0.18.4
I still get an error on
AlgebraOfGraphics v0.6.16
CairoMakie v0.10.6
Makie v0.19.6
@ericphanson are you sure you removed nonnumeric
from the example code?
Oh oops, no I just copied the example code as-is. I must've misread, sorry.
The following works fine:
but if I remove the
nonnumeric
I getMethodError: no method matching color(::Vector{Int64})
.I guess this will be fixed at the same time as #225, but in the meantime it would be nice to have a workaround, so that
alpha
can be used with continous color scales...Stack trace
Tested with AlgebraOfGraphics 0.6.5 and Makie 0.16.5.