Hacker News new | ask | show | jobs
by analog31 1867 days ago
Not to disagree... as a regular matplotlib user, I certainly overlook its quirks in return for what it can do for me. But I think another interpretation is: If you use a complex, flexible library long enough, your recurring themes will eventually evolve into a library that "wraps" the original library.
3 comments

I get your point, but disagree. I agree mpl is very powerful and you can do almost anything with it, but the biggest problem with mpl is the default behaviour for many things is just plain horrible. Take subplots, axis labels and ticks. By default pretty much any attempt will yield overlapping/obscured labels or way too much whitespace. Tight_layout helps a bit but in my experience you essentially have to manually tweak spacing and margins every time.

Similarly things like traditional x/y plots with a centre axis with arrows are much harder than they should be (it can be done but is really quite a bit of hassle).

And there are lots of other, similar issues. I suspect the OP is correct and it will be very difficult to replace mpl for producing publish quality plots (I think for interactive plots it's much easier and already done), despite it's shortcomings, because it is so powerful.

Try the new `constrained_layout=True`
I agree with your assessment. An important thing that you point out though, is that it takes regular use to get a good functional and flexible wrapper.

I occasionally (once every 4 months or so) have to create some plots for reports or analysis, and they are almost always very weird, dissimilar to previous plots. It always ends up being a huge pain, even if sometime in the past I've done something kind of like them (this is especially true for any kind of dynamic plots).

I've ended up building a pretty easy to modify plotting suite out of DearPyGui. I cannot recommend DPG enough, especially for high throughput or large scale plots. Immediate mode programming is a joy to work with, and it's pretty awesome being able to quickly toggle on and off any dataset in realtime.

Try seaborn. It's a decent wrapper.