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

Discussion in 'Python' started by John Hunter, Oct 19, 2004.

  1. John Hunter

    John Hunter Guest

    Re: MatPlotLib question: How to get more different size plotsymbols ?

    >>>>> "Colombes" == Colombes <> 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/screenshots.html#scatter_demo2

    scatter help: http://matplotlib.sourceforge.net/matplotlib.matlab.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
     
    John Hunter, Oct 19, 2004
    #1
    1. Advertising

  2. John Hunter

    Dr. Colombes Guest

    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.
     
    Dr. Colombes, Oct 19, 2004
    #2
    1. Advertising

  3. John Hunter

    Dr. Colombes Guest

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

    Thanks, John.

    Nothing like getting the info straight from the source.



    John Hunter <> wrote in message news:<>...
    > >>>>> "Colombes" == Colombes <> 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/screenshots.html#scatter_demo2
    >
    > scatter help: http://matplotlib.sourceforge.net/matplotlib.matlab.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
     
    Dr. Colombes, Oct 20, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dr. Colombes
    Replies:
    1
    Views:
    1,062
    John Hunter
    Feb 10, 2005
  2. Derek Basch

    Matplotlib logarithmic scatter plot

    Derek Basch, Feb 27, 2006, in forum: Python
    Replies:
    9
    Views:
    4,965
    evander21
    Nov 3, 2010
  3. N/A
    Replies:
    0
    Views:
    837
  4. Replies:
    1
    Views:
    364
    Alan Isaac
    Apr 13, 2007
  5. Rominsky
    Replies:
    0
    Views:
    404
    Rominsky
    Jan 4, 2008
Loading...

Share This Page