12

Using Plots.jl I can make a scatter plot from two vectors with color set by another vector as follows:

using Plots
scatter([1,3,5,7], [2,4,6,10], marker_z = [1,1,2,3])

enter image description here

There is both a legend for the series, and there is a color bar.

If I set legend = false both are removed:

scatter([1,3,5,7], [2,4,6,10], marker_z = [1,1,2,3], legend = false)

:

I would like to remove the legend for the series (the "y1" in a box), and keep the color bar. Does anyone know how to do that? Thank you.

Ben S.
  • 3,415
  • 7
  • 22
  • 43

1 Answers1

16

Derp, figured it out.

scatter([1,3,5,7], [2,4,6,10], marker_z = [1,1,2,3], legend = false, 
        colorbar = true)   

enter image description here

Ben S.
  • 3,415
  • 7
  • 22
  • 43