GGPLOTLY
A data visualization library for Python that combines the grammar of graphics from ggplot2 with the interactivity of Plotly.
Installation
pip install ggplotly
Usage
from ggplotly import *
import pandas as pd
df = pd.DataFrame({
'x': [1, 2, 3, 4, 5],
'y': [1, 2, 3, 4, 5],
'group': ['A', 'A', 'B', 'B', 'B']
})
# Simple scatter plot
ggplot(df, aes(x='x', y='y')) + geom_point()
# With color mapping and theme
ggplot(df, aes(x='x', y='y', color='group')) + geom_point() + theme_minimal()
# Faceted plot
ggplot(df, aes(x='x', y='y')) + geom_point() + facet_wrap('group')
ggplot2 Function Coverage
Geoms (46)
| Function | Description |
|---|---|
geom_point |
Scatter plots |
geom_line |
Line plots (sorted by x) |
geom_lines |
Multi-series line plots |
geom_path |
Path plots (unsorted) |
geom_bar |
Bar charts |
geom_col |
Column charts (pre-computed heights) |
geom_histogram |
Histograms |
geom_boxplot |
Box-and-whisker plots |
geom_violin |
Violin plots |
geom_density |
Density plots |
geom_area |
Filled area plots |
geom_ribbon |
Ribbons with ymin/ymax |
geom_smooth |
Smoothed lines (LOESS, linear) |
geom_tile |
Rectangular tiles/heatmaps |
geom_rect |
Rectangles (xmin/xmax/ymin/ymax) |
geom_text |
Text labels |
geom_label |
Text labels with background |
geom_errorbar |
Error bars |
geom_segment |
Line segments |
geom_step |
Step plots |
geom_rug |
Rug plots |
geom_jitter |
Jittered points |
geom_vline |
Vertical reference lines |
geom_hline |
Horizontal reference lines |
geom_abline |
Diagonal lines (slope/intercept) |
geom_contour |
Contour lines |
geom_contour_filled |
Filled contours |
geom_map |
Choropleth maps |
geom_sf |
Simple features (geographic) |
geom_range |
Range plots (min/max/avg) |
geom_edgebundle |
Edge bundling for networks |
geom_searoute |
Maritime shipping routes |
geom_sankey |
Sankey flow diagrams |
geom_point_3d |
3D scatter plots |
geom_surface |
3D surface plots |
geom_wireframe |
3D wireframe plots |
geom_candlestick |
Candlestick charts (financial) |
geom_ohlc |
OHLC charts (financial) |
geom_waterfall |
Waterfall charts (financial) |
geom_fanchart |
Fan charts for uncertainty |
geom_stl |
STL decomposition plots |
geom_acf |
Autocorrelation function plots |
geom_pacf |
Partial autocorrelation plots |
geom_norm |
Normal distribution overlay |
geom_qq |
Q-Q plots (theoretical vs sample quantiles) |
geom_qq_line |
Q-Q reference line through Q1/Q3 |
Stats (13)
| Function | Description |
|---|---|
stat_identity |
No transformation |
stat_count |
Count observations |
stat_bin |
Bin data |
stat_density |
Kernel density estimation |
stat_ecdf |
Empirical CDF |
stat_smooth |
Smoothing with CI |
stat_summary |
Summary statistics |
stat_contour |
Contour computation |
stat_fanchart |
Fan chart percentiles |
stat_function |
Apply function to data range |
stat_stl |
STL time series decomposition |
stat_qq |
Compute Q-Q quantiles |
stat_qq_line |
Compute Q-Q reference line |
Scales (19)
| Function | Description |
|---|---|
scale_x_continuous |
Continuous x-axis |
scale_y_continuous |
Continuous y-axis |
scale_x_log10 |
Log10 x-axis |
scale_y_log10 |
Log10 y-axis |
scale_x_reverse |
Reversed x-axis |
scale_y_reverse |
Reversed y-axis |
scale_x_date |
Date x-axis |
scale_x_datetime |
DateTime x-axis |
scale_x_rangeslider |
Interactive range slider for zooming |
scale_x_rangeselector |
Range selector buttons for time series |
scale_color_manual |
Manual color mapping |
scale_color_gradient |
Continuous color gradient |
scale_color_brewer |
ColorBrewer palettes |
scale_fill_manual |
Manual fill mapping |
scale_fill_gradient |
Continuous fill gradient |
scale_fill_brewer |
ColorBrewer fill palettes |
scale_fill_viridis_c |
Viridis color palette |
scale_shape_manual |
Manual shape mapping |
scale_size |
Size scaling |
Coordinates (5)
| Function | Description |
|---|---|
coord_cartesian |
Cartesian coordinates with zoom |
coord_fixed |
Fixed aspect ratio coordinates |
coord_flip |
Flip x and y axes |
coord_polar |
Polar coordinates |
coord_sf |
Spatial/geographic coordinates |
Facets (2)
| Function | Description |
|---|---|
facet_wrap |
Wrap facets into rows/columns |
facet_grid |
2D facet grid |
Themes (9)
| Function | Description |
|---|---|
theme_default |
Default theme |
theme_minimal |
Minimal theme |
theme_classic |
Classic ggplot2 theme |
theme_dark |
Dark theme |
theme_ggplot2 |
R's ggplot2 default |
theme_nytimes |
New York Times style |
theme_bbc |
BBC News style |
theme_custom |
Custom theme builder |
theme |
Theme modification |
Theme Elements (3)
| Function | Description |
|---|---|
element_text |
Text element styling |
element_line |
Line element styling |
element_rect |
Rectangle element styling |
Position Adjustments (7)
| Function | Description |
|---|---|
position_identity |
No adjustment (identity) |
position_dodge |
Dodge overlapping objects |
position_dodge2 |
Dodge with variable widths |
position_jitter |
Add random noise |
position_stack |
Stack objects |
position_fill |
Stack and normalize to 100% |
position_nudge |
Nudge points by fixed amount |
Guides & Labels (7)
| Function | Description |
|---|---|
labs |
Set plot labels |
ggtitle |
Set title |
annotate |
Add annotations |
xlim / ylim / lims |
Set axis limits |
guides |
Control legend/colorbar display |
guide_legend |
Configure legend appearance |
guide_colorbar |
Configure colorbar appearance |
Utilities (2)
| Function | Description |
|---|---|
ggsave |
Save plots to file |
ggsize |
Set plot dimensions |
Other
| Function | Description |
|---|---|
aes |
Aesthetic mappings |
after_stat |
Reference computed statistics |
layer |
Create custom layers |
map_data |
Load map data |
data |
Access built-in datasets |
Total: ~120 ggplot2-equivalent functions
Release files for ggplotly 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ggplotly-0.4.1.tar.gz | 4.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ggplotly-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:8.4 MB
Release files / ggplotly-0.4.1.tar.gz
| Download URL | ggplotly-0.4.1.tar.gz |
|---|---|
| Size | 4.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47201f6f41c4598563429924b31f7c2742c3f87674d9274898836416d66f31cd
|
|
BLAKE2b-256 checksum How to use checksums |
b5ef6451575a99fe428c8a97eda5758e9bd1d21d1846994408182197c88f3889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 31, 2025.
Transparency logRelease files / ggplotly-0.4.1-py3-none-any.whl
| Download URL | ggplotly-0.4.1-py3-none-any.whl |
|---|---|
| Size | 4.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3f9a239609262344e7e2f48dbfff19b79d8b7a46b800c3e4093256c4cc6d8db
|
|
BLAKE2b-256 checksum How to use checksums |
2b3ae8dceffc243e14f8a6c8b3688e8bbc90dc7816ff6a24e099d6ac0da84dc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 31, 2025.
Transparency log