matplotlib5 min read
How Bad Is Your Colormap?
(Or, Why People Hate Jet – and You Should Too) I made a little code snippet that I find helpful, and you might too: """Return a grayscale version of the colormap""" cmap = plt.cm.get_cmap(cmap) colors = cmap(np.arange(cmap.N)) # convert RGBA to perceived greyscale luminance # cf.
By Jake VanderPlasPython Data Science Handbook by Jake VanderPlas Blog

Read the full story
Originally published by Python Data Science Handbook by Jake VanderPlas Blog on Oct 16, 2014.
Comments
Sign in to join the discussion.