4 ms·
How is matplotlib outdated? It's just relatively low-level, so it might be quicker to use high-level tools like seaborn or altair (which use matplotlib as their
by goerz 7y ago
How is matplotlib outdated? It's just relatively low-level, so it might be quicker to use high-level tools like seaborn or altair (which use matplotlib as their backend), if that fits the situation. For heavily customized publication-ready plots (that means print), there is no alternative to matplotlib. The other two low-level Python visualization libs, plotly and bokeh (see https://pyviz.org/tools.html https://pyviz.org/tools.html) focus on interactive plots, which is an entirely different use case! Bokeh just does not generate visualizations for print. Thus, it does NOT make matplotlib obsolete. On top of that, last time I checked, bokeh was far less flexible than matplotlib.
- juggernaut390 7y agoJust wait 5 years. I was a heavy matplotlib user and before that used a primitive tool for plotting in C. It actually performed so much better than matplotlib. If working on those one or two figures for hours for a publication is what you’re aiming for, sure matplotlib is still useful for that (I did that during my PhD and postdoc days, sure it’s interesting). But I think that’s where the problem is. We have too many people stuck on an old tool because that’s all they know. I’m watching lectures and courses every morning before work and keeping up to date. It’s helped me get exponentially ahead. I think we need to encourage this mentality. This current post was about showing how to understand data. I guarantee you that if you learn to use bokeh the right way you’ll have significantly faster iteration times. Also, in industry where things are extremely fast paced, you need to move and present your information fast. Again, my disappointment is that we need to encourage a mentality of flexible learners, and I find this post a regression. I’m a bit disappointed at the unpopularity of this comment, but maybe that’s why I’ve moved up to earn an enormous salary. Try it
- nicolaskruchten 7y agoMighty matplotlib isn't going away any time soon, but just because Plotly makes interactive plots, it doesn't mean you can't also a) customize every aspect of the chart, from the fonts to the length of the axis ticks to the legend placement etc (see the full list of thousands of available customization attributes here: https://plot.ly/python/reference/ https://plot.ly/python/reference/) b) export to raster or vector formats for publication (https://plot.ly/python/static-image-export/ https://plot.ly/python/static-image-export/) c) use high-level grammar-of-graphics-inspired tools like https://plotly.express/ https://plotly.express/ to create complex charts in a single line of code.
- goerz 7y agoI haven't really looked at plotly in a very long time. At that time, it was cloud-based. Having the data I'm plotting sent to ploty's servers, or more generally, my plots depending on the availability of some remote server, was a no-go for me. Has this changed?
- nicolaskruchten 7y agoVery much so! Plotly.py version 4 is "offline-only" just like matplotlib and other libraries: https://medium.com/plotly/plotly-py-4-0-is-here-offline-only-express-first-displayable-anywhere-fc444e5659ee https://medium.com/plotly/plotly-py-4-0-is-here-offline-only...
- goerz 7y agoVery nice! I might give it another try sometime soon, then!