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

    If you would like to use additional named colors when plotting with matplotlib, you can use the xkcd crowdsourced color names, via the 'xkcd:' prefix: plt.plot([1,2], lw=4, c='xkcd:baby poop green') Now you have access to a plethora of named colors! Tableau. The default Tableau colors are available in matplotlib via the 'tab:' prefix:

  2. python - How do I print colored text to the terminal? - Stack …

    Apr 25, 2019 · To anyone using the Python example code from the answer: It should be noted that the colors in the range 90-97 and 100-107 are non-standard and, indeed, on my terminal they don't all give the colors indicated by the variable names. …

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

    Joe Kington's excellent answer is already 4 years old [actually, as of Nov 2024, Joe's is 11 yo, and mine it's already 7 yo: time flies when you enjoy yourself!] and Matplotlib has incrementally changed (in particular, the introduction of the cycler module) and the new major release, Matplotlib 2.0.x, has introduced stylistic differences that are important from the point of …

  4. How can I color Python logging output? - Stack Overflow

    Dec 21, 2008 · i.e. the first regex group (parens) matches the initial date in the logfile, the second group matches a python filename, line number and function name, and the third group matches the log message that comes after that. I also use a parallel sequence of 'bold/normals' as well as the sequence of colors. This looks like:

  5. python - Setting different color for each series in scatter plot ...

    The normal way to plot plots with points in different colors in matplotlib is to pass a list of colors as a parameter. E.g.: import matplotlib.pyplot matplotlib.pyplot.scatter([1,2,3],[4,5,6],color=['red','green','blue'])

  6. Defining a color in python - Stack Overflow

    Aug 17, 2011 · I have a question that may be straight forward, or may be impossible to answer, I'm not sure. I'm wondering how I can define a color in python. For example, I would like to simply do this: myColor = #920310 However, using the '#' sign in python automatically comments anything following. Is there a way around this?

  7. python - Generate random colors (RGB) - Stack Overflow

    Apr 4, 2021 · I just picked up image processing in python this past week at the suggestion of a friend to generate patterns of random colors. I found this piece of script online that generates a wide array of different colors across the RGB spectrum.

  8. 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 matplotlib 3.4.2; Choosing Colormaps in Matplotlib for other valid cmap options. Imports and Test Data 'Date' is already a datetime64[ns] dtype from ...

  9. python - How to use terminal color palette with curses - Stack …

    Aug 31, 2013 · I believe that the curses.use_default_colors() call merely makes transparency available; it is a direct call to the use_default_colors() ncurses API function. ncurses colors are otherwise palette based; you need to set your own color attributes per pair number with curses.init_pair() calls, then select a color pair with curses.color_pair() from ...

  10. creating over 20 unique legend colors using matplotlib

    Jul 6, 2017 · I am plotting 20 different lines on a single plot using matplotlib. I use a for loop for plotting and label every line with its key and then use the legend function for key in dict.keys(): plo...

Refresh