Skip to main content
Glama

plot_pcolormesh

Create pseudocolor plots for large datasets on irregular grids to visualize 2D data distributions in scientific research.

Instructions

Create a pseudocolor plot with a non-regular rectangular grid.

This tool generates a fast pseudocolor plot using pcolormesh, ideal for large datasets and irregular grids.

Args: x: X coordinates. Column name or list of values. y: Y coordinates. Column name or list of values. z: Z values (2D array). Column name or 2D list. data_input: Optional. {"file_path": "path/to/file.csv"} or {"data": {...}} shading: Shading method ("auto", "flat", "nearest", "gouraud") style: Optional. {"title": "...", "xlabel": "...", "ylabel": "...", "colormap": "viridis"} output: Optional. {"format": "png/pdf/svg", "width": 15, "height": 10, "dpi": 300}

Returns: PIL Image object or bytes containing the plot

Examples: Basic pcolormesh: >>> x = [1, 2, 3, 4] >>> y = [1, 2, 3, 4] >>> z = [[1, 2, 3, 4], [2, 4, 6, 8], [3, 6, 9, 12], [4, 8, 12, 16]] >>> plot_pcolormesh(x=x, y=y, z=z, shading="gouraud")

From file with custom colormap: >>> plot_pcolormesh( ... x="x_coord", ... y="y_coord", ... z="intensity", ... data_input={"file_path": "field_data.csv"}, ... style={"colormap": "plasma", "title": "Field Intensity"} ... )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
zYes
data_inputNo
shadingNoauto
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