1/10/09 @ 12:21 (-0500), thus spake Srivathsan Srinivas: > Hi, > I am trying to plot a graph and color nodes in a loop. So far, the > for-loop I am using can color them. But, I am able to color them using a > single color. I want to color the nodes differently for each iteration of > the for-loop. How do I do that?
Say you use matplotlib.cm.Reds_r, then you call Reds_r(N) at each iteration, where N is an integer that increases at each iteration. Reds_r(N) returns a colour specification that then you pass to the plotting function as a 'color' argument. > The above code colors the nodes blue and the edges r. I want to options: > > 1 --- For each iteration, I want the nodes to be colored in diminishing > 2 --- For each iteration, I want a separate coloring of the nodes. For separate colouring of the nodes, you need to draw each node separatedly as far as I know. -- Ernest ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users