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")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| z | Yes | ||
| data_input | No | ||
| shading | No | auto | |
| style | No | ||
| output | No |