1212 {
1313 "cell_type" : " markdown" ,
1414 "metadata" : {},
15- "source" : [
16- " # ggplotly\n " ,
17- " \n " ,
18- " A data visualization library for Python that combines the **grammar of graphics** from ggplot2 with the **interactivity** of Plotly.\n " ,
19- " \n " ,
20- " ## Why ggplotly?\n " ,
21- " \n " ,
22- " - **Familiar syntax** - If you know ggplot2 from R, you'll feel right at home\n " ,
23- " - **Interactive plots** - Powered by Plotly for zooming, panning, and hover tooltips\n " ,
24- " - **Jupyter-friendly** - Plots render automatically in notebooks\n " ,
25- " - **Comprehensive** - 90+ ggplot2-equivalent functions\n " ,
26- " \n " ,
27- " ## Quick Example"
28- ]
15+ "source" : " # ggplotly\n\n A 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"
2916 },
3017 {
3118 "cell_type" : " code" ,
3724 {
3825 "cell_type" : " markdown" ,
3926 "metadata" : {},
40- "source" : [
41- " ## Installation\n " ,
42- " \n " ,
43- " ```bash\n " ,
44- " pip install ggplotly\n " ,
45- " ```\n " ,
46- " \n " ,
47- " ## What's Included\n " ,
48- " \n " ,
49- " | Category | Count | Examples |\n " ,
50- " |----------|-------|----------|\n " ,
51- " | **Geoms** | 34 | `geom_point`, `geom_line`, `geom_bar`, `geom_boxplot`, `geom_map` |\n " ,
52- " | **Scales** | 17 | `scale_color_manual`, `scale_fill_gradient`, `scale_x_log10` |\n " ,
53- " | **Themes** | 9 | `theme_minimal`, `theme_dark`, `theme_bbc`, `theme_nytimes` |\n " ,
54- " | **Stats** | 7 | `stat_smooth`, `stat_count`, `stat_density` |\n " ,
55- " | **Coords** | 4 | `coord_flip`, `coord_polar`, `coord_sf` |\n " ,
56- " | **Facets** | 2 | `facet_wrap`, `facet_grid` |\n " ,
57- " \n " ,
58- " ## Gallery\n " ,
59- " \n " ,
60- " Explore examples organized by visualization type:\n " ,
61- " \n " ,
62- " - **[Basic Charts](gallery/basic.ipynb)** - Scatter, line, bar, histograms, box plots\n " ,
63- " - **[Statistical](gallery/statistical.ipynb)** - Smoothing, density, error bars, summaries\n " ,
64- " - **[Time Series](gallery/timeseries.ipynb)** - Date axes, range plots, candlesticks, OHLC\n " ,
65- " - **[Geographic Maps](gallery/maps.ipynb)** - Choropleths, projections, point maps\n " ,
66- " - **[3D Visualizations](gallery/3d.ipynb)** - Scatter, surfaces, wireframes\n " ,
67- " - **[Network Graphs](gallery/networks.ipynb)** - Edge bundling, sea routes\n " ,
68- " - **[Multi-Panel (Facets)](gallery/facets.ipynb)** - Small multiples, facet_wrap, facet_grid\n " ,
69- " - **[Theming](gallery/theming.ipynb)** - Custom themes, publication-ready styling\n " ,
70- " \n " ,
71- " ## Coming from R?\n " ,
72- " \n " ,
73- " ggplotly aims for API compatibility with ggplot2. Most code translates directly:\n " ,
74- " \n " ,
75- " **R (ggplot2):**\n " ,
76- " ```r\n " ,
77- " ggplot(mpg, aes(x = displ, y = hwy, color = class)) +\n " ,
78- " geom_point() +\n " ,
79- " theme_minimal() +\n " ,
80- " labs(title = \" Fuel Efficiency\" )\n " ,
81- " ```\n " ,
82- " \n " ,
83- " **Python (ggplotly):**\n " ,
84- " ```python\n " ,
85- " ggplot(mpg, aes(x='displ', y='hwy', color='class')) + \\\n " ,
86- " geom_point() + \\\n " ,
87- " theme_minimal() + \\\n " ,
88- " labs(title='Fuel Efficiency')\n " ,
89- " ```\n " ,
90- " \n " ,
91- " The main differences:\n " ,
92- " \n " ,
93- " - Column names are strings: `x='column'` not `x = column`\n " ,
94- " - Use `\\ ` or parentheses for line continuation\n " ,
95- " - Import with `from ggplotly import *`"
96- ]
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 *`"
9728 }
9829 ]
9930}
0 commit comments