In the following minimal example, I create 1-point scatter plot and later change color of points in loop using Collection.set_color. If I set the color(s) the first time scatter is called, set_color will not change its face color (only edge color), whereas if I don’t specify it when the scatterplot is created, face color will change according to set_color.
from pylab import *
from numpy import *
coll=scatter([0],[0],s=500,c=[.1]) # omit c=[.1] here to have face color changing later
ion(); show()
for a in linspace(.1,.9):
coll.set_color(coll.get_cmap()(a))
draw()
Is that a bug, or am I missing something in the documentation?
I would say it is a bug/limitation of that matplotlib version.
I tried the code with:
There is also a comment from Avaris saying he gets expected behavior with mpl 1.1.0 (win7, 32bit)
So I recommend you to upgrade your installation if this is possible