Line Chart
plot_line_chartCreate a line chart from numeric data points. Use to visualize relationships between X and Y variables with customizable title, axis labels, line color, and grid.
Instructions
Create a line chart from data points (requires matplotlib).
Note: Use for general XY data. For time-series price data with optional moving average, use plot_financial_line instead.
Examples: plot_line_chart([1, 2, 3, 4], [1, 4, 9, 16], title="Squares") plot_line_chart([0, 1, 2], [0, 1, 4], color='red', x_label='Time', y_label='Distance')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | Line color (name or hex code, e.g., 'blue', '#2E86AB') | |
| title | No | Chart title string, e.g., 'Squares' | Line Chart |
| x_data | Yes | X-axis data points, e.g., [1, 2, 3, 4] | |
| y_data | Yes | Y-axis data points, e.g., [1, 4, 9, 16] | |
| x_label | No | X-axis label, e.g., 'Time' | X |
| y_label | No | Y-axis label, e.g., 'Distance' | Y |
| show_grid | No | Whether to display grid lines |