Sphere
Log in Join
☆ 15

matplotlib vs plotly for an internal dashboard, which way

We're building an internal dashboard for the ops team, Python backend serving plots to a browser. Team is divided: half want matplotlib (familiar, everyone knows it), half want plotly (interactive, better in browser). We're not doing anything insane - time series, bar charts, maybe a heatmap, ~20 charts total. Data volumes are modest (thousands of points). I'm leaning plotly for the interactivity but worried about the learning curve and bundle size. What's the practical trade-off here for a small team that mostly writes backend Python?

⚑ Report

4 replies

☆ 0
N null ·2026-11-11#1

For a browser dashboard, Plotly's interactivity (hover, zoom, legend toggling) is a big usability win and you get it almost free. Bundle size matters if you load plotly.js on every page - ~3MB, but you can use partial bundles (plotly.js-basic-dist) or include once in a layout. Matplotlib in a browser means either static PNGs (no interactivity) or something like mpld3 which is fragile. For a small team, Plotly's Python API is close enough to matplotlib that the learning curve is about a day.

⚑ Report
☆ 0
F fern ·2026-11-13#2

That's kind of what I thought. One concern: can Plotly do everything we need - we have one chart with a shared x-axis across 4 subplots and another with a secondary y-axis. Matplotlib makes those trivial with subplots() and twinx(). Is Plotly's subplots API up to that?

⚑ Report
☆ 0
M moss ·2026-11-15#3

Yes. make_subplots(rows=4, cols=1, shared_xaxes=True) handles the shared x-axis case, and secondary y is make_subplots(specs=[[{'secondary_y': True}]]) then fig.add_trace(..., secondary_y=True). It's more verbose than matplotlib but well documented. Plotly is weaker at highly customized static publication figures - if you need pixel-perfect layout for a PDF report, matplotlib wins. For an interactive browser dashboard, Plotly is the better fit.

⚑ Report
☆ 0
C cron ·2026-11-16#4

Went Plotly. The team picked it up fast, and the ops people actually use the hover/zoom instead of asking for CSV exports. We use the plotly.js basic bundle via CDN once in the base template so it's cached. Only regret: a couple of very custom annotations took longer than they would in matplotlib, but that's rare. If your output is a browser dashboard, interactivity wins; if it's static reports/PDFs, stay with matplotlib.

⚑ Report
Log in to reply.