How to plot data [x,y,z] with z changing the color.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RedHerring
    New Member
    • Mar 2010
    • 2

    How to plot data [x,y,z] with z changing the color.

    Hi,

    I'm trying to plot data using matplotlib. x is time y is another value and z ranges from 1 to 32. I want to use z to change the colour of the points specified by x and y.

    I've tried colormaps and tried specifying the colour by using
    matplotlib.pypl ot.plot(X,Y,'.' ,color=Z/32)
    but I'm confused and stuck.

    Any ideas?
  • RedHerring
    New Member
    • Mar 2010
    • 2

    #2
    Ah, scatter_demo2.p y.

    Should've just kept on truckin'

    Comment

    • Glenton
      Recognized Expert Contributor
      • Nov 2008
      • 391

      #3
      Yeah, once you find the matplotlib gallery there's not much you can't do!

      Comment

      Working...