pub fn quick_plot_2d_with_labels(
x: impl Into<Vec<f64>>,
y: impl Into<Vec<f64>>,
x_label: impl Into<String>,
y_label: impl Into<String>,
title: impl Into<String>,
) -> FigureExpand description
Quickly create a 2D plot with axis labels and a title.
§Arguments
x- x-axis data.y- y-axis data.
§x_label - x-axis label.
y_label- y-axis label.title- Title.
§Returns
Figure.
§Example
use plotting::{quick_plot_2d_with_labels, Figure};
// Plot y = x^2.
let fig: Figure = quick_plot_2d_with_labels(
[1.0, 2.0, 3.0],
[1.0, 4.0, 9.0],
"x",
"y",
"y = x^2",
);§Additional examples
Additional examples can be found at https://tamaskis.github.io/plotting/plot_2d/quick_2d_plot_with_labels.html.