#[derive(Matplotlib)]
#[mpl(title="Sine curve", xlabel="Time[sec]", legend="upper right")]
struct PlotData {
#[mpl(xaxis)]
xdata: Vec<f64>,
#[mpl(yaxis(label="sin(x)"))]
ydata1: Vec<f64>,
#[mpl(yaxis(label="cos(x)"))]
ydata2: Vec<f64>,
}
fn main() {
let plot_data = PlotData::new();
let fig = plot_data.to_fig();
...
}