basemap scatter

Hi all,

I'm trying to do a scatter plot within a map created by basemap.

m = Basemap(projection='ortho',lat_0=45,lon_0=0,resolution='l')
X,Y = m(lon,lat)
m.scatter(X,Y,s=sizes,c=data,edgecolor='none')

This works fine. Now I want to change the sizes of the markers so that the marker at point A has a size that corresponds to circle with radius of 2.5 km, point B to 1.5 km, .... and so on.

Has anyone ever done this?

Thanks in advance.

Mario Mech

I’m afraid the scatter plot does not allow afterward adjustment with size currently (by using setp).

Probably you should redraw the scatter points with different sizes. like

for x,y,z in zip(xlist,ylist,sizelist):

m.scatter(x,y,s=z)

if you question is to change the real 2km or 1.5km to the size on the map,

sorry I don’t know as I never did this. Probably you need consider projection.

Chao

···

On Fri, Apr 12, 2013 at 4:33 PM, marz_cyclone [via matplotlib] <[hidden email]> wrote:

Hi all,

I’m trying to do a scatter plot within a map created by basemap.

m = Basemap(projection=‘ortho’,lat_0=45,lon_0=0,resolution=‘l’)

X,Y = m(lon,lat)

m.scatter(X,Y,s=sizes,c=data,edgecolor=‘none’)

This works fine. Now I want to change the sizes of the markers so that the marker at point A has a size that corresponds to circle with radius of 2.5
km, point B to 1.5 km, … and so on.

Has anyone ever done this?

Thanks in advance.

Mario Mech


Precog is a next-generation analytics platform capable of advanced

analytics on semi-structured data. The platform includes APIs for building

apps and a phenomenal toolset for data science. Developers can use

our toolset for easy data analysis & visualization. Get a free account!

http://www2.precog.com/precogplatform/slashdotnewsletter


Matplotlib-users mailing list

[hidden email]

https://lists.sourceforge.net/lists/listinfo/matplotlib-users


If you reply to this email, your message will be added to the discussion below:

http://matplotlib.1069221.n5.nabble.com/basemap-scatter-tp40883.html

To start a new topic under matplotlib - users, email [hidden email]

  To unsubscribe from matplotlib, click here.


  [NAML](http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml)


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