Plotly
Interactive data visualization library for Python with rich chart and dashboard support.
3. Used by agents' projects
Dependency in 56 public GitHub projects set up for AI coding agents that we scanned (0.9%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
plotly.com/llms.txtFrom the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What Plotly does
plotly.py is a Python front end to the plotly.js browser library, so one figure object can be shown in a Jupyter or marimo notebook, saved as a standalone HTML file, or placed inside a Dash app.
Plotly popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How Plotly is used
- Plotly is a dependency in 56 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (3.5% of the 1,623 Python ones), #7 of 95 in charts and data visualisation.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 550; those are left out of every share on this page.
- The most used alternative in our scan is Matplotlib (167 projects).
- Projects that use it most often also use pandas (87.5%), NumPy (78.6%), python-dotenv (62.5%).
By coding agent
Often used with
Plotly in practice
Strengths
The README quickstart builds one bar chart twice. Plotly Express does it in a single <code>px.bar(...)</code> call. Graph Objects creates a <code>go.Figure()</code> and adds a <code>go.Bar</code> trace to it.
The README lists four places a Plotly graph can be viewed: Jupyter notebooks, other notebook tools such as marimo, standalone HTML files, and Dash applications.
Beyond basic charts, the docs site has tutorials for candlestick and OHLC charts, tile choropleth maps, ROC and PR curves, PCA, and 3D surfaces. It also covers computational biology charts such as volcano plots, Manhattan plots and clustergrams.
The docs site has tutorials for "building interactive UI controls directly into your visualizations": dropdown menus, custom buttons, sliders and range selectors. Separate tutorials cover animations and FigureWidget click events in Jupyter.
Watch out for
Static image export uses <code>kaleido</code> (version 1.0 or greater), and Kaleido needs a Chrome or Chromium install on the machine. If Kaleido can't find one, the README says you may need to run <code>plotly_get_chrome</code>.
The README's Express quickstart uses <code>pip install plotly[express]</code>. It adds that you'll also need to install a supported dataframe library yourself.
To use figures as Jupyter widgets, you have to install <code>jupyter</code> and <code>anywidget</code> separately, with pip or conda.
The same bar chart with Graph Objects and Plotly Express
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Bar(x=["a", "b", "c"], y=[1, 3, 2]))
fig.show()
import plotly.express as px
fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2])
fig.show()More about Plotly
Funding
- GitHub Sponsors: https://github.com/plotly
- Own page: https://plot.ly/products/consulting-and-oem/
- 3 GitHub sponsors
Agent Skills for it
- plotly: Plotly interactive visualization. Express and Graph Objects: scatter, line, bar, heatmap, 3D, geographic charts; subplots; styling; export.
Head to head
- Matplotlib vs Plotly used together in 23 projects
- Seaborn vs Plotly used together in 16 projects
Packages around it
- pandas: DataFrames
- numpy: Numeric arrays
- python-dotenv: .env config loading
- requests: HTTP client
- scikit-learn: Machine learning
- pydantic: Data validation
More in Charts and data visualisation
Alternatives
Plotly This page
Python library for creating static, animated and interactive plots and visualizations.
Statistical data visualization library built on matplotlib with rich plot types.
Create interactive plots and applications in the browser from Python code.
Grammar of Graphics implementation for Python inspired by ggplot2.
Get started
Install it.
pip install plotlyRules for your agent
## Plotly
- For Graph Objects, install with `pip install plotly`, import `plotly.graph_objects as go`, create `go.Figure()`, then call `add_trace(...)` and `fig.show()`.
- For Plotly Express, follow the README quickstart: `pip install plotly[express]`, plus a supported dataframe library.
- For static image export, install `kaleido` version 1.0 or greater. It needs Chrome or Chromium; if Kaleido can't find it, run `plotly_get_chrome`.
- To use figures as Jupyter widgets, also install `jupyter` and `anywidget`.
- If `px.bar` picks the wrong orientation on pandas `uint8` to `uint64` columns, check the version: v7.1.0 lists a fix for Express treating them as categorical.
- If `Figure.show()` renders a too-large div in Google Colab, check the version: v7.1.0 lists a fix for this.