Skip to main content
Glama

plot_box

Generate box plots to compare data distributions by visualizing medians, quartiles, and outliers for statistical analysis.

Instructions

Create a box plot for comparing data distributions.

This tool generates box plots (box-and-whisker plots) showing median, quartiles, and outliers for one or more datasets.

Args: data: For direct input, list of lists (each sublist is a dataset). For file input, column name(s) separated by comma 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: Multiple datasets comparison: >>> plot_box( ... data=[[1, 2, 3, 4, 5], [2, 3, 4, 5, 6], [3, 4, 5, 6, 7]], ... labels=["Group A", "Group B", "Group C"] ... )

From CSV file: >>> plot_box( ... data="scores", ... data_input={"file_path": "test_scores.csv"}, ... style={"title": "Test Score 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