Skip to main content
Glama

plot_histogram

Generate histograms to visualize data distribution and frequency patterns for analysis in machine learning research.

Instructions

Create a histogram for data distribution analysis.

This tool generates a histogram showing the frequency distribution of numerical data. Useful for understanding data spread and patterns.

Args: data: Data column name (string) if using data file, or list of values. data_input: Optional. {"file_path": "path/to/file.csv"} or {"data": {...}} bins: Number of histogram bins (default: 30) density: If True, normalize to show probability density 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: Basic histogram: >>> plot_histogram(data=[1.2, 2.3, 2.5, 3.1, 3.4, 4.2, 4.5], bins=10)

Histogram from CSV with density:
>>> plot_histogram(
...     data="measurement",
...     data_input={"file_path": "measurements.csv"},
...     bins=50,
...     density=True,
...     style={"title": "Measurement Distribution"}
... )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
data_inputNo
binsNo
densityNo
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