4 ms·
As a relative newcomer to python/data science I found it really surprising that Matplotlib seems favoured over Plotly. The Plotly API seems better designed and
by ollysb 4y ago
As a relative newcomer to python/data science I found it really surprising that Matplotlib seems favoured over Plotly. The Plotly API seems better designed and the output is far superior. Is matplotlib just favoured out of momentum or does it have advantages that I haven't found yet?
- pletnes 4y agoWhen I started out there was no plotly. Then plotly required uploading data to their servers. It’s only recently that there’s a real choice IMHO.
- pletnes 4y ago…also «old folks» like me know matplotlib already, there is existing code out there for matplotlib. Matplotlib fits into desktop software and print-quality plots - plotly is more about web plots. Libraries like pandas and seaborn use matplotlib. Really, there are quite a few reasons you might stick to it still. But keep using plotly - keep visualizing data. It’s a superpower!
- kzrdude 4y agoMomentum for a big part, and the libraries that build on top of matplotlib - like seaborn. And the default integrations with matplotlib (pandas, xarray, and a million others)
- patrick451 4y agoPersonally I can't stand plotly. The only thing plotly does better is give you a nice interactive tooltip. While I wish matplotlib were better in that regard, it's usually not enough to get me to switch. Off the top of my head, these are the main pain points I have with plotly: - It's slower than molasses in January for anything more than a few hundred data points. It regularly crashes VScode with the jupyter notebook plugin if I try to plot even 10 minutes of 100 hz data. That alone makes it a cheap toy. In gradschool, I was plotting hours of 25 kHz data in matlab with no problems. - It's display mechanism is to show you plots is a web browser. I can't stand that. It's really slow to open a new browser tab for every plot. They don't re-use browser tabs, so after iterating for 10 minutes you have 20 open tabs. - It's basically useless outside of a Jupyter notebook. If you try to use plotly outside of a jupyter notebook and want more than a single plot, good luck. At best you get different plots in different browser tabs, which is useless. Or you end up wasting time creating a web app just to view data. - It's missing really basic functionality, like separate legends for different subplots. - Maybe just personal preference, but I can't stand it's declarative interface. It leads to way more duplicated code and is too inflexible.