// the find
plotly/plotly.py
The interactive graphing library for Python :sparkles:
plotly.py is a Python wrapper around plotly.js that produces interactive browser-based charts, exportable as self-contained HTML or rendered in Jupyter. It has two APIs: plotly.express for fast one-liners from DataFrames, and graph_objects for full control over every property. The primary audience is data scientists and Dash dashboard developers.
- plotly.express is genuinely well-designed — a single function call with a pandas DataFrame produces a publication-quality interactive chart with sensible defaults, consistent parameter names across chart types, and automatic faceting/animation support
- Self-contained HTML export works well for sharing: the output bundles plotly.js inline, so recipients don't need a server or Python installed to view interactive charts
- WebGL backend via regl handles tens of thousands of points without the browser choking, which SVG-based alternatives (matplotlib, Altair) cannot match at that scale
- The Python API is auto-generated from plotly.js's JSON schema (codegen/resources/plot-schema.json), which keeps the Python and JS APIs in sync without manual maintenance — a real architecture win
- Static image export is still a mess: you need kaleido (an external binary) or the legacy orca CLI, both of which have had platform-specific installation failures on headless Linux and in CI environments — this is a sharp edge that bites people in production pipelines
- figure_factory is effectively a graveyard — functions like distplot, dendrogram, and violin predate plotly.express and produce inconsistent output; many have deprecation warnings but no clear migration path, and pandas API drift has broken some silently
- Debugging layout issues means hunting through layers of auto-generated property validators in enormous files; when you get a nested property wrong the validation error names the property but not where in the hierarchy it belongs, so you end up in the docs rather than the traceback
- Large figures serialize to bloated JSON: a chart with 50 traces and rich hover data can produce multi-megabyte HTML files, and fig.show() in Jupyter blocks until the whole payload is serialized — there is no streaming or lazy trace loading