MCPcopy Index your code
hub / github.com/plotly/plotly.py

github.com/plotly/plotly.py @v6.8.0 sqlite

repository ↗ · DeepWiki ↗ · release v6.8.0 ↗
39,967 symbols 134,558 edges 1,784 files 14,687 documented · 37% 15 cross-repo links
README

plotly.py

Latest Release
User forum
PyPI Downloads
License

Maintained by Plotly

Quickstart

pip install plotly

import plotly.express as px
fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2])
fig.show()

See the Python documentation for more examples.

Overview

plotly.py is an interactive, open-source, and browser-based graphing library for Python :sparkles:

Built on top of plotly.js, plotly.py is a high-level, declarative charting library. plotly.js ships with over 30 chart types, including scientific charts, 3D graphs, statistical charts, SVG maps, financial charts, and more.

plotly.py is MIT Licensed. Plotly graphs can be viewed in Jupyter notebooks, other Python notebook software such as marimo, as standalone HTML files, or integrated into Dash applications.

Contact us for consulting, dashboard development, application integration, and feature additions.

<a href="https://plotly.com/python/" target="_blank">
<img src="https://raw.githubusercontent.com/cldougl/plot_images/add_r_img/plotly_2017.png">



Installation

plotly.py may be installed using pip

pip install plotly

or conda.

conda install -c conda-forge plotly

Jupyter Widget Support

For use as a Jupyter widget, install jupyter and anywidget packages using pip:

pip install jupyter anywidget

or conda:

conda install jupyter anywidget

Static Image Export

plotly.py supports static image export, using either the kaleido package (recommended, supported as of plotly version 4.9) or the orca command line utility (legacy as of plotly version 4.9).

Kaleido

The kaleido package has no dependencies and can be installed using pip

pip install -U kaleido

or conda

conda install -c conda-forge python-kaleido

Extended Geo Support

Some plotly.py features rely on fairly large geographic shape files. The county choropleth figure factory is one such example. These shape files are distributed as a separate plotly-geo package. This package can be installed using pip...

pip install plotly-geo==1.0.0

or conda

conda install -c plotly plotly-geo=1.0.0

plotly-geo can be found on Github at https://github.com/plotly/plotly-geo.

Copyright and Licenses

Code and documentation copyright 2019 Plotly, Inc.

Code released under the MIT license.

Docs released under the Creative Commons license.

Extension points exported contracts — how you extend this code

IPlotlySpec (Interface)
(no doc)
js/src/mimeExtension.ts

Core symbols most depended-on inside this repo

_set_property
called by 12392
plotly/basedatatypes.py
min
called by 3295
plotly/graph_objs/layout/ternary/_baxis.py
push
called by 2715
js/lib/mimeExtension.js
push
called by 2709
plotly/labextension/static/1.747c8e0c8042a68fba0a.js
push
called by 2690
plotly/package_data/widgetbundle.js
map
called by 2355
plotly/graph_objs/_layout.py
n
called by 2230
plotly/labextension/static/1.747c8e0c8042a68fba0a.js
r
called by 1923
plotly/labextension/static/1.747c8e0c8042a68fba0a.js

Shape

Method 25,061
Function 11,196
Class 3,694
Route 15
Interface 1

Languages

TypeScript53%
Python47%

Modules by API surface

plotly/package_data/plotly.min.js5,638 symbols
js/lib/mimeExtension.js5,309 symbols
plotly/package_data/widgetbundle.js5,277 symbols
plotly/labextension/static/1.747c8e0c8042a68fba0a.js4,966 symbols
plotly/basedatatypes.py204 symbols
_plotly_utils/basevalidators.py130 symbols
plotly/graph_objs/_figurewidget.py111 symbols
plotly/graph_objs/_figure.py111 symbols
plotly/graph_objs/_layout.py104 symbols
plotly/graph_objs/layout/_yaxis.py100 symbols
plotly/graph_objs/layout/_xaxis.py100 symbols
plotly/graph_objs/_box.py91 symbols

Dependencies from manifests, versioned

@jupyterlab/builder4.3.6 || ^3.6.8 · 1×
@lumino/widgets2.4.0 · 1×
@types/plotly.js2.33.4 · 1×
esbuild0.23.1 · 1×
lodash-es4.17.21 · 1×
plotly.js3.6.0 · 1×
typescript5.6.2 · 1×
cufflinks0.17.3 · 1×
dask2022.2.0 · 1×
datashader0.14.4 · 1×
geodatasets2026.1.0 · 1×
geopandas0.8.1 · 1×

For agents

$ claude mcp add plotly.py \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact