facecolor and scatter

It seems that the keywords facecolor (or color) and alpha can not be used simultaniously when using "scatter":

import pylab

x = pylab.npy.arange(0,10)
pylab.scatter(x,x, s=50, alpha=0.5)
pylab.scatter(x,x+0.5, facecolor='blue', s=50, alpha=0.5)
pylab.show()

The alpha value of the second call is not set correctly, but kept fix at alpha=1.0. Any idea ???

Manuel

You should use the "c" argument for scatter -- this controls the facecolor.

scatter(x,x+0.5, c='blue', s=50, alpha=0.5)

This is a bit of an anachronism from matlab compatibility.

JDH

···

On 10/18/07, Manuel Metz <mmetz@...1721...> wrote:

It seems that the keywords facecolor (or color) and alpha can not be
used simultaniously when using "scatter":

import pylab

x = pylab.npy.arange(0,10)
pylab.scatter(x,x, s=50, alpha=0.5)
pylab.scatter(x,x+0.5, facecolor='blue', s=50, alpha=0.5)
pylab.show()

The alpha value of the second call is not set correctly, but kept fix at
alpha=1.0. Any idea ???

This is now fixed in svn, so you can use facecolor as well. Note that
for constant size and color markers, plot will be significantly faster

  ax.plot(x, x+0.5, mfc='blue', alpha=0.5, ms=20)

JDH

···

On 10/18/07, John Hunter <jdh2358@...287...> wrote:

You should use the "c" argument for scatter -- this controls the facecolor.

scatter(x,x+0.5, c='blue', s=50, alpha=0.5)

This is a bit of an anachronism from matlab compatibility.

John,
svn works fine now. thanks.

John Hunter wrote:

···

On 10/18/07, John Hunter <jdh2358@...287...> wrote:

You should use the "c" argument for scatter -- this controls the facecolor.

scatter(x,x+0.5, c='blue', s=50, alpha=0.5)

This is a bit of an anachronism from matlab compatibility.

This is now fixed in svn, so you can use facecolor as well. Note that
for constant size and color markers, plot will be significantly faster

  ax.plot(x, x+0.5, mfc='blue', alpha=0.5, ms=20)

JDH