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
Working on Ubuntu Eoan. Unsure what to do as I am very new to Rust.
Code
use plotters::prelude::*;fnmain(){let root_drawing_area = BitMapBackend::new("result.png",(1024,768)).into_drawing_area();
root_drawing_area.fill(&WHITE);let chart = ChartBuilder::on(&root_drawing_area).build_ranged(-3.14..3.14, -1.2..1.2).unwrap();
chart.draw(LineSeries::new((-314..314).map(|x| x asf64 / 100.0).map(|x| (x, x.sin())),&RED)).unwrap();}
yields error:
Compiling mcmc v0.1.0 (/home/rik/mcmc)
error[E0599]: no method named `draw` found for type `plotters::chart::context::ChartContext<'_, plotters::drawing::backend_impl::bitmap::BitMapBackend<'_>, plotters::coord::ranged::RangedCoord<_, _>>` in the current scope
--> src/main.rs:16:11
|
16 | chart.draw(LineSeries::new(
| ^^^^ method not found in `plotters::chart::context::ChartContext<'_, plotters::drawing::backend_impl::bitmap::BitMapBackend<'_>, plotters::coord::ranged::RangedCoord<_, _>>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.
error: could not compile `mcmc`.
To learn more, run the command again with --verbose.
shell returned 101
The text was updated successfully, but these errors were encountered:
Working on Ubuntu Eoan. Unsure what to do as I am very new to Rust.
Code
yields error:
The text was updated successfully, but these errors were encountered: