plotly.py README

The project's README from github.com/plotly/plotly.py. As one markdown file: README.md.

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.



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 the kaleido package (version 1.0 or greater).

Kaleido has minimal dependencies and can be installed using pip

pip install -U kaleido

or conda

conda install -c conda-forge python-kaleido

Kaleido requires Chrome or Chromium to generate images. By default, Kaleido will use the Chrome or Chromium version already installed on your system. If you don't have it installed or Kaleido can't find it, you may need to install it by running the command:

plotly_get_chrome

on your command line.

Code and documentation copyright 2026 Plotly, Inc.

Code released under the MIT license.

Docs released under the Creative Commons license.

plotly.py (plotly/plotly.py)

Searching Database…

18.8K ·GitHub
这是什么东西?一个开源的 Python 交互式绘图库:用 Python 代码描述图表,就能在浏览器里得到可交互的图形。
它是我导入的 Python 包,还是需要我自己部署的东西——图表到底是怎么画出来的?它是你导入的 Python 库。底层是 plotly.js 之上的一个高层声明式封装,图表实际由 plotly.js 在浏览器里渲染。
怎么把它加到项目里?运行 pip install plotly(用 conda 也行)——快速上手就这么简单,Python 文档里有更多示例。
在 Jupyter 里使用还需要装别的东西吗?只有需要交互式控件时才要:用 pip 或 conda 在 plotly 之外再装上 jupyter 和 anywidget 这两个包。
如果我想把图表导出成静态图片,是不是开箱即用?不完全能:导出需要 kaleido 包(v1.0+),而 Kaleido 又依赖 Chrome 或 Chromium——如果系统里找不到,可以用 plotlygetchrome 命令来安装。
是不是只能在 Jupyter 里用,图表还能在哪些地方显示?除了 Jupyter,图表还可以在 marimo 等其他笔记本软件中查看,保存为独立的 HTML 文件,或者集成到 Dash 应用里。
免费吗?商业用途也可以吗?可以——plotly.py 采用 MIT 许可证;代码版权归 Plotly, Inc. 所有,文档采用 Creative Commons 许可。
它到底能画哪些图表?plotly.js 自带 30 多种图表类型:科学图表、3D 图形、统计图表、SVG 地图、金融图表等等。
背后的公司提供付费服务吗?提供。Plotly, Inc. 通过 README 里的联系方式提供咨询、仪表盘开发、应用集成和功能定制等服务。
它还在积极维护吗?是的——README 里的版权标注是 2026 年,仓库还运行着文档构建、包构建、更新日志、代码生成和格式检查等 CI 工作流。
Creator
plotly
Size
418.3 MB
Stars
18.8K
Age
12y
Commits · 90 Days