From 351588e1462eafeea935627b1e7ccb66c8b7d5c0 Mon Sep 17 00:00:00 2001 From: Andrew Dirksen Date: Fri, 5 Nov 2021 15:52:15 -0700 Subject: [PATCH 1/3] run 'cargo upgrade' to update dependencies --- Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ea0e2db..dfdf694 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" From e22dbc6f9cfe8be6dbd0d8d58fb86289f8ccb8a1 Mon Sep 17 00:00:00 2001 From: Andrew Dirksen Date: Fri, 5 Nov 2021 16:13:15 -0700 Subject: [PATCH 2/3] bump version from 0.3.0 to 0.4.0 in preparation of a cargo publish --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index dfdf694..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" From 2feeeb0e8d16bd4a1ee34516d2fb4cf8d1ceb106 Mon Sep 17 00:00:00 2001 From: Andrew Dirksen Date: Fri, 5 Nov 2021 16:20:47 -0700 Subject: [PATCH 3/3] implement changes suggested by cargo check --example --- examples/cpustat.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)))