About 672,000 results
Open links in new tab
  1. python - Named colors in matplotlib - Stack Overflow

    What named colors are available in matplotlib for use in plots? I can find a list on the matplotlib documentation that claims that these are the only names: b: blue g: green r: red c: cyan m: mag...

  2. python - Plotting different colors in matplotlib - Stack Overflow

    Suppose I have a for loop and I want to plot points in different colors: for i in range(5): plt.plot(x,y,col=i) How do I automatically change colors in the for loop?

  3. How to pick a new color for each plotted line within a figure

    from matplotlib import pyplot as plt for i in range(20): plt.plot([0, 1], [i, i]) plt.show() then I get this output: If you look at the image above, you can see that matplotlib attempts to pick colors for …

  4. How to cycle through colors in a plot for each iteration of a for loop

    Apr 7, 2020 · I am finding similar questions that cycle through colours but not one that is dependent on a particular for loop. I provide some links below: How to pick a new color for …

  5. Setting different color for each series in scatter plot

    import matplotlib.pyplot matplotlib.pyplot.scatter([1,2,3],[4,5,6],color=['red','green','blue']) When you have a list of lists and you want them colored per list. I think the most elegant way is that …

  6. python - Get default line color cycle - Stack Overflow

    Dec 12, 2017 · 188 I noticed when you plot that the first line is blue, then orange, then green, and so on. Is there some way to access this list of colors? I've seen a million posts on how to …

  7. python - Matplotlib discrete colorbar - Stack Overflow

    I am trying to make a discrete colorbar for a scatterplot in matplotlib I have my x, y data and for each point an integer tag value which I want to be represented with a unique colour, e.g. plt.s...

  8. Matplotlib Plot Lines with Colors Through Colormap

    The Matplotlib colormaps accept an argument (0..1, scalar or array) which you use to get colors from a colormap. For example:

  9. How to generate random colors in matplotlib? - Stack Overflow

    Feb 6, 2013 · What's the trivial example of how to generate random colors for passing to plotting functions? I'm calling scatter inside a loop and want each plot a different color. for X,Y in data: …

  10. How to change the color of the axis, ticks and labels

    Jan 21, 2011 · I'd like to change the color of the axis, as well as ticks and value-labels for a plot I did using matplotlib and PyQt.