News for hackers. Stuff that matters.
Re:Playing with Matplotlib style sheets by mywaifuismeta on Thursday February 03, 2022 @09:58AM (#30193216)
Why isn't this flagged? And why does this get upvotes? This a low-quality zero-content bait article. The same thing is right there in the matplotlib documentation [0]

[0] https://matplotlib.org/stable/gallery/style_sheets/style_she...

Re:Playing with Matplotlib style sheets by version_five on Thursday February 03, 2022 @11:03AM (#30194110)
I use matplotlib all the time and I didn't know about it. Maybe the documentation page is a better reference, but I'm happy the post was posted so I could learn about the existence of these stylesheets. I'd much rather see posts like this than links to twitter threads
Re:Playing with Matplotlib style sheets by pininja on Thursday February 03, 2022 @10:52AM (#30193960)
I have no affiliation and looked at both articles. It would have been nice for them to acknowledge where the plot design came from, since that’s a copy of their doc code. They did add a section on locating and applying a custom style sheet, and an introduction that read easily. That possibly enough.
Re:Playing with Matplotlib style sheets by slingnow on Thursday February 03, 2022 @09:55AM (#30193175)
The title is "playing with", but the article is just a gallery of EXISTING stylesheets. At the bottom is a blurb about how to make your own custom one by simply copying one that exists. There's almost zero content here other than "stylesheets exist".
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)

Re:Playing with Matplotlib style sheets by melling on Thursday February 03, 2022 @09:35AM (#30192903)
Is there an experts guide to matplotlib for those who want to delve into creating sophisticated charts?
Re:Playing with Matplotlib style sheets by c-fe on Thursday February 03, 2022 @09:37AM (#30192925)
Re:Playing with Matplotlib style sheets by tvhahn on Thursday February 03, 2022 @11:53AM (#30194901)
I just spent the last hour browsing through the book and figures. Thanks! Lots of great inspiration in there.
Re:Playing with Matplotlib style sheets by leviathan303 on Thursday February 03, 2022 @09:59AM (#30193230)
The matplotlib documentation is very good, especially if you've used it before. However, it can be confusing when not using pyplot:

https://matplotlib.org/stable/tutorials/index.html

Re:Playing with Matplotlib style sheets by byefruit on Thursday February 03, 2022 @08:32AM (#30192134)
Did not realise matplotlib had style sheets, that could have been useful. Thanks.

Also - unnecessarily gendered title?