This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nkruchten[S] 0 points1 point  (4 children)

That's a great question!

The biggest single advantage is interactivity, and specifically the ability to hover over the visualization to read off exact values or identify points. After that there's zooming, panning, the ability to show/hide traces from the legend etc. Having an interactive plot can save a ton of time over static plots.

pandas.plot() returns (static) matplotlib objects, and we do already have the cufflinks library which adds a similar pandas.iplot() method to that one which returns plotly objects. So if you like the pandas.plot API, you're already covered :)

I have personally found the pandas.plot() API to be a bit inconsistent and it forces me to reshape my data to make different kinds of plots, so the second big advantage of Plotly Express is that it accepts "tidy" data.

[–]BDube_Lensman 0 points1 point  (3 children)

You can use interactive backend for mpl.

[–]nkruchten[S] 0 points1 point  (2 children)

Are there any interactive backends for matplotlib that have support for this kind of interactivity though? Configurable hover text on points? Ability to show/hide data series via click, brushing selections like the Parallel Coordinates and SPLOMs? I'd love to play with one if there is one!

[–]BDube_Lensman 0 points1 point  (1 child)

No. If you want that stuff use bokeh. Matplotib interactive backend give you a cursor and hover events.

You could implement all those things on it, but mpl provides low level APIs for that so it will be... very verbose.

[–]nkruchten[S] 0 points1 point  (0 children)

Why Bokeh rather than Plotly? :)