create_plot
Generate customizable statistical visualizations using plotnine's grammar of graphics. Create scatter plots, line charts, histograms, and multi-layer plots with themes, facets, and scales from various data sources.
Instructions
Create a plotnine visualization from data.
This tool allows you to create highly customizable plots using the grammar of graphics. You can specify data sources (file, URL, or inline), aesthetic mappings, geometries, scales, themes, facets, labels, and coordinate systems.
NEW: Multi-layer plots! Use 'geoms' array to combine multiple geometries in one plot.
Example usage:
Simple scatter plot: provide data_source, aes (x, y), and geom (type: "point")
Multi-layer plot: use geoms array with multiple geometries (e.g., point + smooth)
Line plot with custom theme: add theme config with base and customizations
Faceted plot: include facet config to split by categorical variables
Multiple scales: provide list of scale configs for x, y, color, etc.
All parameters support extensive customization through nested objects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_source | Yes | Data source configuration (file, URL, or inline data) | |
| aes | Yes | Aesthetic mappings (column names from data) | |
| geom | No | Single geometry specification (use 'geoms' for multi-layer plots) | |
| geoms | No | Multiple geometry specifications for layered plots (e.g., scatter + smooth, boxplot + jitter) | |
| scales | No | Scale configurations for axes and aesthetics | |
| theme | No | Theme configuration | |
| facets | No | Faceting configuration | |
| labels | No | Plot labels | |
| coords | No | Coordinate system configuration | |
| stats | No | Statistical transformation configurations | |
| output | No | Output configuration |