Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > MatPlotLib question: How to get more different size plot symbols ?

Reply
Thread Tools

MatPlotLib question: How to get more different size plot symbols ?

 
 
John Hunter
Guest
Posts: n/a
 
      10-19-2004
>>>>> "Colombes" == Colombes <(E-Mail Removed)> writes:

Colombes> MatPlotLib question: How to get more different size plot
Colombes> symbols in the plot function ?

Colombes> Is there a way to get different size squares (or circles
Colombes> or triangles, etc.) ?

Colombes> For example, in a two dimensional plot of heights and
Colombes> weights of individuals, is there a way to represent also
Colombes> the age of the individual by the size of the plot symbol
Colombes> ?

Yes, you will want to use the scatter function for this. With "plot",
you can change the size of the symbols with the markersize keyword
argument, but all of the markers must be the same size. With scatter,
the individual marker size (and colors) can vary.

See

example code: http://matplotlib.sf.net/examples/scatter_demo.py

screenshot: http://matplotlib.sourceforge.net/sc...#scatter_demo2

scatter help: http://matplotlib.sourceforge.net/ma....html#-scatter

scatter support the following marker shapes (currently all regular
polygons)

's' : square
'o' : circle
'^' : triangle up
'>' : triangle right
'v' : triangle down
'<' : triangle left
'd' : diamond
'p' : pentagram
'h' : hexagon
'8' : octagon

Hope this helps,
JDH
 
Reply With Quote
 
 
 
 
Dr. Colombes
Guest
Posts: n/a
 
      10-19-2004
MatPlotLib question: How to get more different size plot symbols in
the plot function ?

Is there a way to get different size squares (or circles or triangles,
etc.) ?

For example, in a two dimensional plot of heights and weights of
individuals, is there a way to represent also the age of the
individual by the size of the plot symbol ?

Thanks for your help.
 
Reply With Quote
 
 
 
 
Dr. Colombes
Guest
Posts: n/a
 
      10-20-2004
Thanks, John.

Nothing like getting the info straight from the source.



John Hunter <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> >>>>> "Colombes" == Colombes <(E-Mail Removed)> writes:

>
> Colombes> MatPlotLib question: How to get more different size plot
> Colombes> symbols in the plot function ?
>
> Colombes> Is there a way to get different size squares (or circles
> Colombes> or triangles, etc.) ?
>
> Colombes> For example, in a two dimensional plot of heights and
> Colombes> weights of individuals, is there a way to represent also
> Colombes> the age of the individual by the size of the plot symbol
> Colombes> ?
>
> Yes, you will want to use the scatter function for this. With "plot",
> you can change the size of the symbols with the markersize keyword
> argument, but all of the markers must be the same size. With scatter,
> the individual marker size (and colors) can vary.
>
> See
>
> example code: http://matplotlib.sf.net/examples/scatter_demo.py
>
> screenshot: http://matplotlib.sourceforge.net/sc...#scatter_demo2
>
> scatter help: http://matplotlib.sourceforge.net/ma....html#-scatter
>
> scatter support the following marker shapes (currently all regular
> polygons)
>
> 's' : square
> 'o' : circle
> '^' : triangle up
> '>' : triangle right
> 'v' : triangle down
> '<' : triangle left
> 'd' : diamond
> 'p' : pentagram
> 'h' : hexagon
> '8' : octagon
>
> Hope this helps,
> JDH

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Matplotlib logarithmic scatter plot Derek Basch Python 9 11-03-2010 07:30 PM
Several images onto one 2D-plot in matplotlib? karsten.borgwardt@gmail.com Python 1 04-13-2007 12:50 AM
plot data from Excel sheet by Matplotlib, how? N/A Python 0 05-13-2006 08:13 AM
Variable size plot symbols, variable hue plot colors in Python (MatPlotLib) ? Dr. Colombes Python 1 02-10-2005 08:49 PM



Advertisments