2 ms·
> Fifthly, the APIs were horribly designed (especially matplotlib, good grief) I've seen comments like this fairly often, but am not really sure what about mat
by jpeloquin 6y ago
> Fifthly, the APIs were horribly designed (especially matplotlib, good grief)
I've seen comments like this fairly often, but am not really sure what about matplotlib's API makes it so bad. Hoping to learn why.
The only equal-basis competitor to matplotlib that I'm familiar with is Matlab, which is definitely worse. Declarative plotting libraries like ggplot2 have a nicer API, but the grammar of graphics approach is an entirely different paradigm, which gets as thorny as anything else if you have to do something unexpected. For the kind of medium-level plotting where you're given prepared plot elements, but have to explicitly specify where to draw them in data or figure coords, what would be an example of a "good" API (better than matplotlib)?
- throwaway894345 6y agoThe API is state full and the args it accepts are arbitrary. It just tries to guess what you want it to do based on the types of the args you pass and their order. I’m not sure which plotting API is better, but there’s nothing unique about plotting in all of computing that requires an insane API.