diff --git a/Cargo.toml b/Cargo.toml index ea0e2db..069231f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plotters-piston" -version = "0.3.0" +version = "0.4.0" authors = ["Hao Hou "] edition = "2018" license = "MIT" @@ -12,9 +12,9 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -plotters-backend = "0.3.0" +plotters-backend = "0.3.2" piston_window = "0.120.0" [dev-dependencies] -plotters = {version = "0.3.0", default_features = false, features = ["ttf", "all_series"]} -systemstat = "0.1.5" +plotters = { version = "0.3.1", default_features = false, features = ["ttf", "all_series"] } +systemstat = "0.1.10" diff --git a/examples/cpustat.rs b/examples/cpustat.rs index 5b08315..0ce8f5e 100644 --- a/examples/cpustat.rs +++ b/examples/cpustat.rs @@ -1,6 +1,6 @@ use piston_window::{EventLoop, PistonWindow, WindowSettings}; use plotters::prelude::*; -use plotters_piston::{draw_piston_window, PistonBackend}; +use plotters_piston::draw_piston_window; use systemstat::platform::common::Platform; use systemstat::System; @@ -43,7 +43,7 @@ fn main() { .caption("Real Time CPU Usage", ("sans-serif", 30)) .x_label_area_size(40) .y_label_area_size(50) - .build_ranged(0..N_DATA_POINTS as u32, 0f32..1f32)?; + .build_cartesian_2d(0..N_DATA_POINTS as u32, 0f32..1f32)?; cc.configure_mesh() .x_label_formatter(&|x| format!("{}", -(LENGTH as f32) + (*x as f32 / FPS as f32)))