scatter plot without edge color

Dear all,

how can I make a scatter plot without edgecolor?

import matplotlib.pyplot as plt
In [110]: plt.scatter(np.arange(10),np.arange(10,20),edgecolor=None)
Out[110]: <matplotlib.collections.CircleCollection object at 0x5cf16d0>

in this case I can use edgecolor=‘w’ to solve it, but when points overlap, this does not work anymore.
Any help will be appreciated. Thanks.

Chao

···


Chao YUE
Laboratoire des Sciences du Climat et de l’Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex

Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16


Hi Chao!

import matplotlib.pyplot as plt
In [110]: plt.scatter(np.arange(10),np.arange(10,20),edgecolor=None)
Out[110]: <matplotlib.collections.CircleCollection object at 0x5cf16d0>

in this case I can use edgecolor='w' to solve it, but when points overlap, this does not work anymore.
Any help will be appreciated. Thanks.

For scatter plots, I usually use:

plt.plot(x,y,'.')

You can manipulate a bit the marker, markersize, style and alpha parameters (nice when there are really too many points overlapping, to get an idea of the "distribution"). In your ipython, type plot? to get all the available options.

Cheers,

jean-louis

···

On Oct 15, 2011, at 2:55 PM, Chao YUE wrote:

Chao
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Hi Chao,

I think what you want is ‘none’:

plt.scatter(np.arange(10),np.arange(10,20), color=‘y’,edgecolor=‘none’)

It’s confusing, but None is used to let matplotlib auto-select the color, while ‘none’ is used to turn off edge coloring.

Best,
-Tony

···

On Sat, Oct 15, 2011 at 8:55 AM, Chao YUE <chaoyuejoy@…287…> wrote:

Dear all,

how can I make a scatter plot without edgecolor?

import matplotlib.pyplot as plt
In [110]: plt.scatter(np.arange(10),np.arange(10,20),edgecolor=None)
Out[110]: <matplotlib.collections.CircleCollection object at 0x5cf16d0>

in this case I can use edgecolor=‘w’ to solve it, but when points overlap, this does not work anymore.
Any help will be appreciated. Thanks.

cool. it’s done!! Thanks!!!

Chao

2011/10/15 Tony Yu <tsyu80@…287…>

···

On Sat, Oct 15, 2011 at 8:55 AM, Chao YUE <chaoyuejoy@…287…> wrote:

Dear all,

how can I make a scatter plot without edgecolor?

import matplotlib.pyplot as plt
In [110]: plt.scatter(np.arange(10),np.arange(10,20),edgecolor=None)
Out[110]: <matplotlib.collections.CircleCollection object at 0x5cf16d0>

in this case I can use edgecolor=‘w’ to solve it, but when points overlap, this does not work anymore.
Any help will be appreciated. Thanks.

Hi Chao,

I think what you want is ‘none’:

plt.scatter(np.arange(10),np.arange(10,20), color=‘y’,edgecolor=‘none’)

It’s confusing, but None is used to let matplotlib auto-select the color, while ‘none’ is used to turn off edge coloring.

Best,
-Tony


Chao YUE
Laboratoire des Sciences du Climat et de l’Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex

Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16