Plots.jl add colorbar when plotting Shape

#1

I am plotting in the same plot multiple Shape(), each with a different fill color.
How can I add a colorbar for these colors to the plot ?

#2

If you use the fill_z keyword you should get a colorbar, e.g.

plot([Shape(rand(3), rand(3)) for i=1:5], fill_z=rand(5))
#3

Thanks for your help.

I would like to hide the black lines around the shapes.
But when I set linealpha=0 the colorbar disappears.

plot([Shape(rand(3), rand(3)) for i=1:5], fill_z=rand(5), linealpha=0)

I have tried linewidth=0 without success.

#4

Seems like a bug. As a workaround, you can have lines of the same color as the shapes, e.g.

z = rand(5)
plot([Shape(rand(3), rand(3)) for i=1:5], fill_z=z, line_z=z)
#5

line_z works perfectly! Many thanks!

I will open an issue for linealpha.