plot_line
Generate line plots from CSV, JSON, or direct data inputs to visualize trends and relationships in research data.
Instructions
Create a line plot from data.
This tool generates a line plot using UltraPlot/Matplotlib. You can provide data either as a file path (CSV/JSON) or directly as lists.
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": {...}} style: Optional. {"title": "...", "xlabel": "...", "ylabel": "...", "colormap": "...", "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 line plot with direct data: >>> plot_line(x=[1, 2, 3], y=[1, 4, 9])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| data_input | No | ||
| style | No | ||
| output | No |