News for hackers. Stuff that matters.
Re:Playing with Matplotlib style sheets by geoduck14 on Thursday February 03, 2022 @08:46AM (#30192291)
I was using matplotlib yesterday - it is pretty rough. The style sheets will be helpful to make the colors better - but I also struggled with generating line thick enough to be meaningful, showing out enough to see the chart, and labeling data
Re:Playing with Matplotlib style sheets by willis936 on Thursday February 03, 2022 @09:16AM (#30192652)
It has its issues, but as someone who has used a Lot of MATLAB I will say the built-in colormaps of matplotlib are far superior. For personal stuff it's fine to rely on file exchange colormaps, but I feel less great about using external code in my academic and government work environments.
Re:Playing with Matplotlib style sheets by abnry on Thursday February 03, 2022 @09:43AM (#30193008)
My quick and dirty trick is to set an alpha=0.8 to soften the default colors. It always looks better.
Re:Playing with Matplotlib style sheets by willis936 on Thursday February 03, 2022 @10:30AM (#30193654)
I don't mind the default colormap (parula). If I'm using the color for any sort of dimension then I start to care about the colormap choices. Perceptually uniform and colorblind agnostic choices are important for any sort of publication, and arguably a starter for any sort of accessibility considerations.
Re:Playing with Matplotlib style sheets by xapata on Thursday February 03, 2022 @11:29AM (#30194504)
Take a look at colorcet. https://colorcet.holoviz.org/
Re:Playing with Matplotlib style sheets by willis936 on Thursday February 03, 2022 @11:36AM (#30194612)
The four uniform colormaps that the page references are the value that I'm referring to. Viridis, plasma, inferno, and magma. I don't want a huge selection of colormaps, just a few good ones.

Here is where to get them on the file exchange. This really ought to just be folded into MATLAB proper releases somehow.

https://www.mathworks.com/matlabcentral/fileexchange/51986-p...

Re:Playing with Matplotlib style sheets by kh1 on Thursday February 03, 2022 @10:06AM (#30193325)
Indeed that does make charts look better. I do this for grid line:

ax.set_axisbelow(True) ax.grid(True, alpha=0.3)