r/Python • • Apr 21 '22

Discussion Unpopular opinion: Matplotlib is a bad library

I work with data using Python a lot. Sometimes, I need to do some visualizations. Sadly, matplotlib is the de-facto standard for visualization. The API of this library is a pain in the ass to work with. I know there are things like Seaborn which make the experience less shitty, but that's only a partial solution and isn't always easily available. Historically, it was built to imitate then-popular Matlab. But I don't like Matlab either and consider it's API and plotting capabilities very inferior to e.g. Wolfram Mathematica. Plus trying to port the already awkward Matlab API to Python made the whole thing double awkward, the whole library overall does not feel very Pythonic.

Please give a me better plotting libary that works seemlessly with Jupyter!

1.1k Upvotes

325 comments sorted by

View all comments

Show parent comment

6

u/RocketSurgeonDrCox Apr 21 '22

Presentations, technical reports/papers, yeah you can really get sucked down a rabbit hole of tweaking axes, color maps, etc.

4

u/nachos_lemonheads Apr 21 '22

And I personally feel like better to 'script' what you need on Python/R then make the fine-tunings in Illustrator/Inkscape. Unless your PI likes everything perfectly on the first go-around 😅

2

u/RocketSurgeonDrCox Apr 21 '22

That's fair, I make some adjustments in Illustrator and maybe if I was better at Illustrator I'd do more of that. I'm just familiar enough with matplotlib it's easier to do it there.

I also have had times where I need to generate the same figure in different color maps/scales, different fonts, etc. for presentation versus document, so it made sense to me to automate that in Python.