Navigate:
plotly.py
~$PLOTL0.2%

plotly.py: Interactive graphing library for Python

Interactive browser-based charts from Python with declarative API.

LIVE RANKINGS • 10:20 AM • STEADY
OVERALL
#297
53
DEVELOPER TOOLS
#56
9
30 DAY RANKING TREND
ovr#297
·Devel#56
STARS
18.3K
FORKS
2.8K
7D STARS
+30
7D FORKS
+4
See Repo:
Share:

Learn more about plotly.py

plotly.py is a Python graphing library that generates interactive visualizations rendered in web browsers. It wraps plotly.js and provides a high-level, declarative API for constructing charts without requiring direct JavaScript knowledge. The library supports rendering in Jupyter notebooks, standalone HTML files, and integration with Dash applications for building dashboards. Charts are built using SVG and WebGL rendering depending on the chart type and complexity.

plotly.py

1

Declarative API design

Uses a high-level, declarative syntax through modules like plotly.express that abstract away underlying plotly.js complexity. This approach allows users to specify what data to visualize without managing rendering details.

2

Multiple deployment contexts

Visualizations can be rendered in Jupyter notebooks, marimo, standalone HTML files, or embedded in Dash applications. This flexibility supports different workflows from exploratory analysis to production dashboards.

3

Comprehensive chart library

Ships with over 30 chart types including 3D graphs, statistical charts, SVG maps, and financial charts. The underlying plotly.js library provides both SVG and WebGL rendering options for different performance and quality trade-offs.


import plotly.express as px
import pandas as pd

# Create sample data
data = {
    'x_values': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    'y_values': [2, 5, 3, 8, 7, 6, 9, 4, 1, 10],
    'categories': ['A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B'],
    'sizes': [20, 30, 25, 35, 40, 15, 50, 45, 30, 25]
}
df = pd.DataFrame(data)

# Create interactive scatter plot
fig = px.scatter(df, x='x_values', y='y_values', 
                 color='categories', size='sizes',
                 hover_data=['sizes'],
                 title='Interactive Scatter Plot')

# Update layout
fig.update_layout(width=800, height=600)
fig.show()

vv6.5.2

Fixes pie trace legend and showlegend attributes to properly accept array values.

  • Fix issue where pie trace `legend`, `showlegend` attributes don't accept array values
vv6.5.1

Adds per-slice pie chart legend configuration and fixes Plotly Express template handling.

  • Fix issue where Plotly Express ignored trace-specific color sequences defined in templates via `template.data.<trace_type>`
  • Speed up `validate_gantt` function
  • Add support for arrays for the pie properties `showlegend` and `legend`, so that these can be configured per slice
vv6.5.0

Adds hovertemplate support for candlestick and OHLC traces, fixes numpy datetime handling.

  • Add `hovertemplate` for `candlestick` and `ohlc` traces
  • Fix bug where numpy datetime contained in Python list was converted to integer


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers