Skip to content

Commit f11780b

Browse files
committed
fix index
1 parent d2b7d9f commit f11780b

File tree

1 file changed

+108
-14
lines changed

1 file changed

+108
-14
lines changed

docs/index.ipynb

Lines changed: 108 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,124 @@
11
{
2-
"nbformat": 4,
3-
"nbformat_minor": 5,
4-
"metadata": {
5-
"kernelspec": {
6-
"display_name": "Python 3",
7-
"language": "python",
8-
"name": "python3"
9-
}
10-
},
112
"cells": [
123
{
134
"cell_type": "markdown",
145
"metadata": {},
15-
"source": "# ggplotly\n\nA data visualization library for Python that combines the **grammar of graphics** from ggplot2 with the **interactivity** of Plotly.\n\n## Why ggplotly?\n\n- **Familiar syntax** - If you know ggplot2 from R, you'll feel right at home\n- **Interactive plots** - Powered by Plotly for zooming, panning, and hover tooltips\n- **Jupyter-friendly** - Plots render automatically in notebooks\n- **Comprehensive** - 113+ ggplot2-equivalent functions\n\n## Quick Example"
6+
"source": [
7+
"# ggplotly\n",
8+
"\n",
9+
"A data visualization library for Python that combines the **grammar of graphics** from ggplot2 with the **interactivity** of Plotly.\n",
10+
"\n",
11+
"## Why ggplotly?\n",
12+
"\n",
13+
"- **Familiar syntax** - If you know ggplot2 from R, you'll feel right at home\n",
14+
"- **Interactive plots** - Powered by Plotly for zooming, panning, and hover tooltips\n",
15+
"- **Jupyter-friendly** - Plots render automatically in notebooks\n",
16+
"- **Comprehensive** - 113+ ggplot2-equivalent functions\n",
17+
"\n",
18+
"## Quick Example"
19+
]
1620
},
1721
{
1822
"cell_type": "code",
1923
"execution_count": null,
2024
"metadata": {},
2125
"outputs": [],
22-
"source": "from ggplotly import *\nimport pandas as pd\n\ndf = pd.DataFrame({\n 'x': [1, 2, 3, 4, 5],\n 'y': [1, 4, 9, 16, 25],\n 'group': ['A', 'A', 'B', 'B', 'B']\n})\n\n# Simple scatter plot with color mapping\nggplot(df, aes(x='x', y='y', color='group')) + geom_point(size=10) + theme_minimal()"
26+
"source": [
27+
"from ggplotly import *\n",
28+
"import pandas as pd\n",
29+
"\n",
30+
"df = pd.DataFrame({\n",
31+
" 'x': [1, 2, 3, 4, 5],\n",
32+
" 'y': [1, 4, 9, 16, 25],\n",
33+
" 'group': ['A', 'A', 'B', 'B', 'B']\n",
34+
"})\n",
35+
"\n",
36+
"# Simple scatter plot with color mapping\n",
37+
"(\n",
38+
" ggplot(df, aes(x='x', y='y', color='group'))\n",
39+
" + geom_point(size=10)\n",
40+
" + theme_minimal()\n",
41+
")"
42+
]
2343
},
2444
{
2545
"cell_type": "markdown",
2646
"metadata": {},
27-
"source": "## Installation\n\n```bash\npip install ggplotly\n```\n\n## What's Included\n\n| Category | Count | Examples |\n|----------|-------|----------|\n| **Geoms** | 44 | `geom_point`, `geom_line`, `geom_bar`, `geom_boxplot`, `geom_map` |\n| **Scales** | 17 | `scale_color_manual`, `scale_fill_gradient`, `scale_x_log10` |\n| **Themes** | 9 | `theme_minimal`, `theme_dark`, `theme_bbc`, `theme_nytimes` |\n| **Stats** | 13 | `stat_smooth`, `stat_count`, `stat_density` |\n| **Coords** | 4 | `coord_flip`, `coord_polar`, `coord_sf` |\n| **Facets** | 2 | `facet_wrap`, `facet_grid` |\n\n## Gallery\n\nExplore examples organized by visualization type:\n\n- **[Basic Charts](gallery/basic.ipynb)** - Scatter, line, bar, histograms, box plots\n- **[Statistical](gallery/statistical.ipynb)** - Smoothing, density, error bars, summaries\n- **[Time Series](gallery/timeseries.ipynb)** - Date axes, range plots, candlesticks, OHLC\n- **[Geographic Maps](gallery/maps.ipynb)** - Choropleths, projections, point maps\n- **[3D Visualizations](gallery/3d.ipynb)** - Scatter, surfaces, wireframes\n- **[Network Graphs](gallery/networks.ipynb)** - Edge bundling, sea routes\n- **[Multi-Panel (Facets)](gallery/facets.ipynb)** - Small multiples, facet_wrap, facet_grid\n- **[Theming](gallery/theming.ipynb)** - Custom themes, publication-ready styling\n\n## Coming from R?\n\nggplotly aims for API compatibility with ggplot2. Most code translates directly:\n\n**R (ggplot2):**\n```r\nggplot(mpg, aes(x = displ, y = hwy, color = class)) +\n geom_point() +\n theme_minimal() +\n labs(title = \"Fuel Efficiency\")\n```\n\n**Python (ggplotly):**\n```python\nggplot(mpg, aes(x='displ', y='hwy', color='class')) + \\\n geom_point() + \\\n theme_minimal() + \\\n labs(title='Fuel Efficiency')\n```\n\nThe main differences:\n\n- Column names are strings: `x='column'` not `x = column`\n- Use `\\` or parentheses for line continuation\n- Import with `from ggplotly import *`"
47+
"source": [
48+
"## Installation\n",
49+
"\n",
50+
"```bash\n",
51+
"pip install ggplotly\n",
52+
"```\n",
53+
"\n",
54+
"## What's Included\n",
55+
"\n",
56+
"| Category | Count | Examples |\n",
57+
"|----------|-------|----------|\n",
58+
"| **Geoms** | 44 | `geom_point`, `geom_line`, `geom_bar`, `geom_boxplot`, `geom_map` |\n",
59+
"| **Scales** | 17 | `scale_color_manual`, `scale_fill_gradient`, `scale_x_log10` |\n",
60+
"| **Themes** | 9 | `theme_minimal`, `theme_dark`, `theme_bbc`, `theme_nytimes` |\n",
61+
"| **Stats** | 13 | `stat_smooth`, `stat_count`, `stat_density` |\n",
62+
"| **Coords** | 4 | `coord_flip`, `coord_polar`, `coord_sf` |\n",
63+
"| **Facets** | 2 | `facet_wrap`, `facet_grid` |\n",
64+
"\n",
65+
"## Gallery\n",
66+
"\n",
67+
"Explore examples organized by visualization type:\n",
68+
"\n",
69+
"- **[Basic Charts](gallery/basic.ipynb)** - Scatter, line, bar, histograms, box plots\n",
70+
"- **[Statistical](gallery/statistical.ipynb)** - Smoothing, density, error bars, summaries\n",
71+
"- **[Time Series](gallery/timeseries.ipynb)** - Date axes, range plots, candlesticks, OHLC\n",
72+
"- **[Geographic Maps](gallery/maps.ipynb)** - Choropleths, projections, point maps\n",
73+
"- **[3D Visualizations](gallery/3d.ipynb)** - Scatter, surfaces, wireframes\n",
74+
"- **[Network Graphs](gallery/networks.ipynb)** - Edge bundling, sea routes\n",
75+
"- **[Multi-Panel (Facets)](gallery/facets.ipynb)** - Small multiples, facet_wrap, facet_grid\n",
76+
"- **[Theming](gallery/theming.ipynb)** - Custom themes, publication-ready styling\n",
77+
"\n",
78+
"## Coming from R?\n",
79+
"\n",
80+
"ggplotly aims for API compatibility with ggplot2. Most code translates directly:\n",
81+
"\n",
82+
"**R (ggplot2):**\n",
83+
"```r\n",
84+
"ggplot(mpg, aes(x = displ, y = hwy, color = class)) +\n",
85+
" geom_point() +\n",
86+
" theme_minimal() +\n",
87+
" labs(title = \"Fuel Efficiency\")\n",
88+
"```\n",
89+
"\n",
90+
"**Python (ggplotly):**\n",
91+
"```python\n",
92+
"(\n",
93+
" ggplot(mpg, aes(x='displ', y='hwy', color='class'))\n",
94+
" + geom_point()\n",
95+
" + theme_minimal()\n",
96+
" + labs(title='Fuel Efficiency')\n",
97+
")\n",
98+
"\n",
99+
"# OR\n",
100+
"\n",
101+
"ggplot(mpg, aes(x='displ', y='hwy', color='class')) + \\\n",
102+
" geom_point() + \\\n",
103+
" theme_minimal() + \\\n",
104+
" labs(title='Fuel Efficiency')\n",
105+
"```\n",
106+
"\n",
107+
"The main differences:\n",
108+
"\n",
109+
"- Column names are strings: `x='column'` not `x = column`\n",
110+
"- Use `\\` or parentheses for line continuation\n",
111+
"- Import with `from ggplotly import *`"
112+
]
28113
}
29-
]
30-
}
114+
],
115+
"metadata": {
116+
"kernelspec": {
117+
"display_name": "Python 3",
118+
"language": "python",
119+
"name": "python3"
120+
}
121+
},
122+
"nbformat": 4,
123+
"nbformat_minor": 5
124+
}

0 commit comments

Comments
 (0)