Skip to content

Comment on A Better Default Colormap for Matplotlib

Comments

When it comes to plot colors in matplotlib, it's why I start with

import seaborn as sns

to get a nice plot theme, not "good old 90s" style. See: https://speakerdeck.com/pmigdal/teaching-machine-learning?sl...

This, changes everything.

The theme seaborn uses is actually a direct clone from ggplot2 from R

Yes. Though, I think that 'whitegrid' is a cleaner theme (if there were axes).

For ggplot theme, in matplotlib there is

plt.style.use('ggplot')

(see also: http://pandas.pydata.org/pandas-docs/stable/visualization.ht...).

'ticks' plus sns.despine() is my favorite.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.