3 ms·
matplotlib is an example of unnecessarily complex and confusing "organic" API It is designed to be familiar to people who already know MATLAB, and it does that
by gaius 9y ago
matplotlib is an example of unnecessarily complex and confusing "organic" API
It is designed to be familiar to people who already know MATLAB, and it does that quite well. So it is not "unnecessary", it's like that for a reason. I agree tho' that someone who has never touched MATLAB might want to plot directly from Pandas, or maybe use Seaborn.
- rspeer 9y agoThe problem is that both Pandas and Seaborn are customized by passing their kwargs onto matplotlib, or by giving you back matplotlib axes objects. You have to break through the abstraction pretty much immediately. You can't really put the finishing touches on your graphs without also knowing matplotlib.
- avian 9y agoI didn't have any significant MATLAB background when I started using matplotlib and I found it a joy to use. I think "organic" part of the API is very well integrated and completely optional in most places. For instance, you can use the matlabish shortcut "subplot(111)" or you can spell out the parameters in a pythonic way as "subplot(nrows=1, ncols=1, plot_number=1)".
- omginternets 9y ago>It is designed to be familiar to people who already know MATLAB Yes, and this was a mistake. Other than logical-indexing, there's one is better off forgetting _everything_ about MATLAB.
- kinkrtyavimoodh 9y agoI am fairly comfortable with doing basic matrix work in MATLAB and I am fairly comfortable using Python, but I have found matplotlib to be quite hard to get the hang of. Esp when you add it to pandas which is also slightly idiosyncratic in its own way, and then all of these are different from numpy, which is a mess of its own.