Hacker News new | past | comments | ask | show | jobs | submit login

What do people here think of plotly when compared to matplotlib? I've read through some of the api documentation and have created graphs with the latter, but don't have much experience with plotly.



Personally, I find matplotlib far more intuitive. It's really easy to just get a plot from the repl in about 3 seconds. It also give you the kind of control you need to produce a publication style figure. But it is really limited if you want basic interactivity, like an informative tooltip. Plotly has much better interactivity. You basically get the tooltips and nice zooming for free. But plotly sucks when it comes to creating one off plots. The whole thing is tied to display in a browser, which I find incredibly annoying. If you aren't building a web page, and aren't using a Jupyter notebook, it's quite the pain.


It's really nice for exploring data. I find whenever I have ~5+ series on a single axis on mpl I start to struggle to differentiate colours & lines etc. I sort of addressed that by getting creative with dash styles etc, but still it's not ideal. Plotly is much more dynamic & I love the call outs etc. I do find it much less intuitive and less well documented than mpl and it's fussy about the shape of the data you give it. Maybe this new version improves on those things.


I'd love to hear more about what you found fussy in terms of shape of data... I've worked really hard to make Plotly Express as flexible as possible in terms of input formats (https://plotly.com/python/px-arguments/) and Graph Objects will eat pretty much anything list-like :)


Hey, thanks for the response - it was actually exactly what you seem to have addressed re the wide & long formats. I'm still using v4.1 and ended up writing my own reshapeForPlotly() function which just called the pandas melt function. Will update to v5 now which sounds like it will simplify things.

I think Plotly is great, btw! I use it a lot with streamlit for quick visualisations of big datasets. Thanks for your work on it. I always found the relationship between plotlyexpress & graph_objects confusing but the docs seem much more explanatory now than I remember from a year or so ago and the code snippets on the main plotly site seem much more abundant. Hopefully as it gets more widely used, the community support on stackoverflow etc will build too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: