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

    For more details, please refer to the matplotlib colors documentation and the source file specifying the available colors, _color_data.py.

  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. 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 change the color …

  4. python - 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 suggesyted by …

  5. python - How to set the default color cycle for all subplots with ...

    How can I set a default set of colors for plots made with matplotlib? I can set a particular color map like this import numpy as np import matplotlib.pyplot as plt fig=plt.figure(i) ax=plt.gca()

  6. python - Color a scatter plot by Column Values - Stack Overflow

    pandas.DataFrame.plot and matplotlib.pyplot.scatter can take a c or color parameter, which must be a color, a sequence of colors, or a sequence of numbers. Tested in python 3.8, pandas 1.3.1, and …

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

  8. python - 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 …

  9. 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 …

  10. colors - How to create colour gradient in Python? - Stack Overflow

    Gradients produced by this method pass through other colors to form a gradient - It's not a true gradient of only two colors - i.e. using this to go from red to blue will generate yellow and green colors.