Skip to main content
Glama

plot_scatter

Generate scatter plots to visualize relationships between variables, with options to map point sizes and colors to additional data dimensions for multi-dimensional analysis.

Instructions

Create a scatter plot with optional size and color mapping.

This tool generates a scatter plot where point sizes and colors can represent additional data dimensions.

Args: x: X-axis data. Column name (string) if using data file, or list of values. y: Y-axis data. Column name (string) if using data file, or list of values. data_input: Optional. {"file_path": "path/to/file.csv"} or {"data": {...}} size: Optional point sizes. Column name, list of values, or single value. color: Optional point colors. Column name or list of values for colormap. style: Optional. {"title": "...", "xlabel": "...", "ylabel": "...", "colormap": "viridis", "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 scatter plot: >>> plot_scatter(x=[1, 2, 3], y=[1, 4, 9])

Scatter with size and color mapping: >>> plot_scatter( ... x="height", ... y="weight", ... size="age", ... color="bmi", ... data_input={"file_path": "health_data.csv"}, ... style={"colormap": "plasma"} ... )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
data_inputNo
sizeNo
colorNo
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