Skip to main content
Glama

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"] ... )

From file: >>> plot_violin( ... data="reaction_time", ... data_input={"file_path": "experiment.csv"}, ... style={"title": "Reaction Time Distribution"} ... )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
data_inputNo
labelsNo
styleNo
outputNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nishide-dev/ml-research-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server