Changing edge colour of scatterplot

I'm trying to draw a scatter plot where each point is a different colour and
is only a single pixel. Unfortunately at the minute, while I can change the
colour and size, I haven't been able to remove the edges of the markers and
my single pixel becomes the colour of the edge. I've attached some sample
code below. Can anyway see what I've done wrong? It currently just gives
back an error.

And a related question. Is using scatter the best way to draw a plot of
single pixels? Or would it be more efficient to use one of the more
primitive classes to do this?

fig = plt.figure()
ax = fig.add_subplot(111)

x=[1,2,3,4]
y=[2,3,5,4]
s=1
c=[0.4, 0.2, 0.3, 0.5]

prop=dict(edgecolors='none')
ax.scatter(x,y, s=s, c=c, **prop)
plt.show()

···

--
View this message in context: http://www.nabble.com/Changing-edge-colour-of-scatterplot-tp25530171p25530171.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

I'm trying to draw a scatter plot where each point is a different colour and
is only a single pixel. Unfortunately at the minute, while I can change the
colour and size, I haven't been able to remove the edges of the markers and
my single pixel becomes the colour of the edge. I've attached some sample
code below. Can anyway see what I've done wrong? It currently just gives
back an error.

Your code works as expected with the current svn head. If you're using
older version of mpl, can you try to update and see if it solves the
problem?
If you're using recent version of mpl, please post an error message you got.

And a related question. Is using scatter the best way to draw a plot of
single pixels? Or would it be more efficient to use one of the more
primitive classes to do this?

matplotlib basically creates a vector-based plot, and a notion of
"single-pixel" is not very meaningful. While it makes some sense for
raster output formats like png, but still, the result depends on the
dpi of your output. Note that unit for the parameter "s" in the
scatter function is in points(**2). 1 points corresponds to one pixel
in dpi=72. With higher dpi, the scatter points will occupy more than a
single pixel.

Regards,

-JJ

···

On Sun, Sep 20, 2009 at 11:45 PM, bwgoudey <bwgoudey@...287...> wrote:

fig = plt.figure()
ax = fig.add_subplot(111)

x=[1,2,3,4]
y=[2,3,5,4]
s=1
c=[0.4, 0.2, 0.3, 0.5]

prop=dict(edgecolors='none')
ax.scatter(x,y, s=s, c=c, **prop)
plt.show()
--
View this message in context: http://www.nabble.com/Changing-edge-colour-of-scatterplot-tp25530171p25530171.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options