About 670,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 each line that …

  4. What are the hex codes of matplotlib tab10 palette?

    Oct 15, 2020 · Turns out this piece of code from the matplotlib examples gave me the answer I was after. The hex codes of the "tableau" palette are as follows:

  5. 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 each plotted line within a …

  6. 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...

  7. Prettier default plot colors in matplotlib - Stack Overflow

    Apr 4, 2013 · I've also noticed that if you plot more than 5-6 different series in a single plot, matplotlib starts repeating colors. I've seen some gorgeous graphs coming out of other visualization packages …

  8. 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: scatter(...

  9. Matplotlib.colors.ListedColormap in python - Stack Overflow

    A ListedColormap is a colormap with listed colors. Such a colormap may be useful for showing discrete colorlevels, e.g. in an image plot (imshow or pcolormesh), other 2D plots like tripcolor or a scatter …

  10. Getting individual colors from a color map in matplotlib

    Aug 20, 2014 · If you have a Colormap cmap, for example: cmap = matplotlib.cm.get_cmap('Spectral') How can you get a particular colour out of it between 0 and 1, where 0 is the first colour in the map …