You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use plotters::{backend::SVGBackend, prelude::*};fnmain(){let root = SVGBackend::new("plot.svg",(1920,1080)).into_drawing_area();letmut chart = ChartBuilder::on(&root).build_cartesian_2d(0..1,0..1).unwrap();// Using `label_style` results in chart being borrowed for 'static
chart.configure_mesh().label_style(24);}
Compiler output
error[E0597]: `chart` does not live long enough
--> src/main.rs:11:5
|
6 | let mut chart = ChartBuilder::on(&root)
| --------- binding `chart` declared here
...
11 | chart.configure_mesh().label_style(24);
| ^^^^^-----------------
| |
| borrowed value does not live long enough
| argument requires that `chart` is borrowed for `'static`
12 | }
| - `chart` dropped here while still borrowed
Version Information
The behavior is present on 0.3.6 which is the current state of master
Rust version: 1.78.0
The text was updated successfully, but these errors were encountered:
Describe the bug
I wanted to increase the size of the labels but got a lifetime error.
I haven't found a workaround, nor the cause of the error.
However, this looks similar to #62
To Reproduce
Compiler output
Version Information
The behavior is present on 0.3.6 which is the current state of
master
Rust version: 1.78.0
The text was updated successfully, but these errors were encountered: