4 ms·
As a Python newbie, their docs seem wayyy more welcoming than MatPlot. I'm a newbie to data visualization so their extensive examples and how their organized i
by gandreani 8y ago
As a Python newbie, their docs seem wayyy more welcoming than MatPlot.
I'm a newbie to data visualization so their extensive examples and how their organized is a way better exploratory experience for me.
Also their API seems way more sane than MatPlot. I haven't used both extensively so these are just first impressions
- brilee 8y agoYou're right that matplotlib has an unpleasant API - I've never had a good experience with matplotlib, but I've used Altair for a few data viz tasks and love it. Matplotlib intentionally took on the API that Matlab had created, to make it easier for Matlab users to jump over to the Python ecosystem. But today, very few people are coming to Python from a Matlab background so the API just looks wonky.
- mkl 8y agoMatplotlib basically has two APIs, the global state Matlab-like one PyPlot (which is often used in beginner tutorials), and a much nicer object-oriented API, where state is explicitly connected to the plot components. To quote from their documentation [1]: "While it is easy to quickly generate plots with the matplotlib.pyplot module, we recommend using the object-oriented approach for more control and customization of your plots." I use matplotlib.pyplot for basically only two purposes, calling subplots to get figure and axis objects, or calling rc_context to set up a "with" block with certain settings (e.g. font size). That said, I'm certainly watching where alternative plotting libraries are going. I've used bqplot a bit, but only played around with others so far. [1] https://matplotlib.org/api/pyplot_summary.html#the-object-oriented-api https://matplotlib.org/api/pyplot_summary.html#the-object-or...