Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "plotters-piston"
version = "0.3.0"
version = "0.4.0"
authors = ["Hao Hou <haohou302@gmail.com>"]
edition = "2018"
license = "MIT"
Expand All @@ -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"
Comment on lines 14 to -20
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated by cargo upgrade.

plotters = { version = "0.3.1", default_features = false, features = ["ttf", "all_series"] }
systemstat = "0.1.10"
4 changes: 2 additions & 2 deletions examples/cpustat.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use piston_window::{EventLoop, PistonWindow, WindowSettings};
use plotters::prelude::*;
use plotters_piston::{draw_piston_window, PistonBackend};
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PistonBackend is unused.

use plotters_piston::draw_piston_window;
use systemstat::platform::common::Platform;
use systemstat::System;

Expand Down Expand Up @@ -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)?;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build_ranged is now deprecated in favor of build_cartesian_2d

.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)))
Expand Down