5 ms·
Personally I find the style and whitespace defaults in matplotlib to be surprisingly displeasing. It always looks like "I just threw this together—I'll fix it l
by twarge 4y ago
Personally I find the style and whitespace defaults in matplotlib to be surprisingly displeasing. It always looks like "I just threw this together—I'll fix it later." Sure, you can fix it, but it's a huge fight.
PyX is a much better alternative. Like TeX, everything you make looks great.
edit for links:
https://pyx-project.org/examples/graphs/index.html https://pyx-project.org/examples/graphs/index.html
https://sourceforge.net/p/pyx/gallery/index/ https://sourceforge.net/p/pyx/gallery/index/
- jethkl 4y agoThe "I'll fix it later" aesthetic of matplotlib is addressed well by seaborn [1], which is built on top of matplotlib. Seaborn also works gracefully with Pandas. The killer feature for me of seaborn is "sns.despine()". PyX is new to me, but it looks like it hasn't been updated in a while [2, 3]. [1] https://seaborn.pydata.org https://seaborn.pydata.org [2] https://pyx-project.org/news.html https://pyx-project.org/news.html [3] https://github.com/pyx-project/pyx https://github.com/pyx-project/pyx
- twarge 4y agoOh seaborn does look like an improvement. Honestly there is no need to update it because it is already perfect. It is like TeX in that way. However there is some missing stuff like contour plots.
- funstuff007 4y ago+1 on Seaborn. I'd never make anything for outside consumption direct from matplotlib. If I need it done quickly, Seaborn looks professional.
- hprotagonist 4y agobut, drags in pandas.
- Scene_Cast2 4y agoEven standalone (feeding numpy arrays), I found it choking when going past 30k points in certain scenarios (2d heatmaps IIRC).
- funstuff007 4y agoIs matplotlib (sans seaborn) performant in this scenario?
- lr1970 4y agoThe PyX's github repo [0] shows fairly low activity recently. The last commit was on November 21, 2021 (almost a year ago). I am curious whether PyX is in a maintenance mode? [0] https://github.com/pyx-project/pyx https://github.com/pyx-project/pyx
- twarge 4y agoAs a PyX user for 17 years it's more that the software is complete and does everything most people need perfectly.
- pilotneko 4y agoThere are built-in styles. Personally, i find plt.style.use(‘ggplot’) at the top of my scripts to make a big difference.
- avnigo 4y agoMatplotlib is definitely a monolith, and it does seem like a huge fight to fix the style, but what is great is you can easily use some of its several predefined styles [0], define your own style sheets or customize specific style parameters through rcParams [1], or install third-party style sheets [2], so in the end the styling does seem much more manageable. [0]: https://matplotlib.org/stable/gallery/style_sheets/style_sheets_reference.html https://matplotlib.org/stable/gallery/style_sheets/style_she... [1]: https://matplotlib.org/stable/tutorials/introductory/customizing.html https://matplotlib.org/stable/tutorials/introductory/customi... [2]: https://pythonawesome.com/matplotlib-style-for-scientific-publications/ https://pythonawesome.com/matplotlib-style-for-scientific-pu...
- thehours 4y agoPython is my daily driver, but I briefly experimented with R and had a delightful experience with ggplot2. The ‘grammar of graphics’ was hard to leave behind when I switched back to Python, until I heard about Plotnine [1], which brings much of the same grammar and functionality to Python. It’s built on Matplotlib and a few other common libraries like Pandas. [1] https://plotnine.readthedocs.io/en/stable/ https://plotnine.readthedocs.io/en/stable/
- chaxor 4y agoIs there any way to do hextri plots with this? That has been one plot that is sorely needed in python for showing multiclass jointplots.
- Tarq0n 4y agoI don't think any package outside of one particular R one offers that functionality premade, as it's not a particularly common configuration.