plot_violin
Generate violin plots to visualize and compare data distributions using kernel density estimation and box plot elements for detailed statistical analysis.
Instructions
Create a violin plot for detailed distribution comparison.
This tool generates violin plots, which combine box plots with kernel density estimation to show the full distribution shape.
Args: data: For direct input, list of lists (each sublist is a dataset). For file input, column name(s) or single column. data_input: Optional. {"file_path": "path/to/file.csv"} or {"data": {...}} labels: Optional labels for each dataset style: Optional. {"title": "...", "xlabel": "...", "ylabel": "...", "grid": True} output: Optional. {"format": "png/pdf/svg", "width": 15, "height": 10, "dpi": 300}
Returns: PIL Image object or bytes containing the plot
Examples: Comparing distributions: >>> plot_violin( ... data=[[1, 2, 2, 3, 3, 3, 4], [2, 3, 4, 4, 5, 5, 6]], ... labels=["Control", "Treatment"] ... )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| data_input | No | ||
| labels | No | ||
| style | No | ||
| output | No |