|
From: Thomas C. <tca...@gm...> - 2014-11-13 17:04:35
|
If you want each marker to be a different color you have to use scatter. You can pass scatter a sequence of colors (see http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.scatter) so you don't have to go through making a custom colormap. Tom On Thu Nov 13 2014 at 9:01:42 AM "V. Armando Solé" <so...@es...> wrote: > Hello, > > I am trying to plot a line assigning a user specified color to each > marker. The idea is that if I have n points x, n ppoints y, I was > expecting to be able to provide n markeredgecolors or n markerfacecolors > as a (npoints, 4) array of RGBA values. However that does not seem to be > possible (or I have failed to find it). > > The closest thing to that functionality I have found is based on > creating a colormap with as many entries as points to be plotted: > > http://stackoverflow.com/questions/16834861/create-own- > colormap-using-matplotlib-and-plot-color-scale > > and that only seems to work with scatter plots. > > Any hint about how to generate a Line2D object with a user specified set > of colors (therefore not needing to create and use a colormap)? > > Thanks for your time, > > Armando > > > ------------------------------------------------------------ > ------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://pubads.g.doubleclick.net/gampad/clk?id=154624111& > iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |