5 ms·
A Better Default Colormap for Matplotlib
- tixzdk 10y agoJavascript version: https://github.com/politiken-journalism/scale-color-perceptual https://github.com/politiken-journalism/scale-color-perceptu...
- jks 10y agoThis will be the default in Matplotlib 2.0, and a beta was just tagged: http://article.gmane.org/gmane.comp.python.matplotlib.announce/9 http://article.gmane.org/gmane.comp.python.matplotlib.announ...
- stared 10y agoWhen 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?slide=5 https://speakerdeck.com/pmigdal/teaching-machine-learning?sl...
- serialx 10y agoThis, changes everything. The theme seaborn uses is actually a direct clone from ggplot2 from R
- stared 10y agoYes. 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.html http://pandas.pydata.org/pandas-docs/stable/visualization.ht...).
- gammarator 10y ago'ticks' plus sns.despine() is my favorite.
- yoodenvranx 10y agoI started using viridis a few weeks ago and I love it!
- franblas 10y agoI'm mostly using seaborn (https://web.stanford.edu/~mwaskom/software/seaborn/ https://web.stanford.edu/~mwaskom/software/seaborn/) to wrap matplotlib graphs but great to see a direct alternative into the matplotlib library.
- xioxox 10y agoIf you're interested in colour maps, cubehelix [1] is a useful scheme to make intensity maps which display well when converted to greyscale. [1] https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/ https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/
- Bromskloss 10y agoThat was an amusing talk. I had fun watching it.
- jules 10y agoIn the talk when he showed the 3 similar maps getting equal score, and then the green one getting a much higher score, that could easily be because people couldn't decide between the 3 similar maps, to they went with the one different map. To do a proper comparison the test should be 1-1 or 3-3, not 3-1.
- xiphias 10y agoThey wanted green because it's a python library. He goes into the details in the talk
- donquichotte 10y agoI also enjoy using Olga Botvinnik's prettyplotlib: github.com/olgabot/prettyplotlib
- slmouradian 10y agoI dislike that the whole page, including the updates, do not contain any dates...
- carreau 10y agoGood point. I'll ping authors to update page with dates.
- jxy 10y agoIf you use gnuplot, which I do exclusively, you may like this repository: https://github.com/Gnuplotting/gnuplot-palettes
- wnkrshm 10y agoI'm pleased. They look extremely similar to the gnuplot and gnuplot2 color maps already present in matplotlib, my favorites.
- martian 10y agoOP here: really worth watching the embedded video on this topic. Viridis is born out of an awesome, intense deep-dive into research on human vision and perception.
- Aardwolf 10y agoIs it strange that I find the old "JET" the best? It uses the most hues (green, yellow, red and blue are all there), so things are the most distinguishable. The others are either only blue/green/yellow, or only purple/red/yellow.
- Scaevolus 10y agoQuick, which represents a larger value, green or red? Having a gradient between two colors, from dark to light, makes it easier to determine the scale. Rainbow gradients look nice, but hue transitions are nowhere near as intuitive as luminance.
- pdabbadabba 10y agoI think you're both correct, but your points respond to different needs. For some types of results (and audiences and modes of presentation) its more important that the reader be able to determine the approximate value that a color corresponds to than that the reader be able to quickly intuit the progression of values. For me, Jet is better at the former while Viridis et al are better at the latter.
- lalaithion 10y agoYes, that's the point. People like it a lot but are worse at actually interpreting it. It's confusing when people have to read lots of confusing data quickly
- mbostock 10y agoI ported these color scales to d3-scale and D3 4.0: https://github.com/d3/d3-scale/blob/master/README.md#sequential-scales https://github.com/d3/d3-scale/blob/master/README.md#sequent...