Skip to content

Commit 8e120a1

Browse files
authored
Merge pull request #183 from chrisduerr/fix_docs
Remove references to `build_ranged` in examples
2 parents ebc2307 + 9abbcfd commit 8e120a1

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
171171
.margin(5)
172172
.x_label_area_size(30)
173173
.y_label_area_size(30)
174-
.build_ranged(-1f32..1f32, -0.1f32..1f32)?;
174+
.build_cartesian_2d(-1f32..1f32, -0.1f32..1f32)?;
175175

176176
chart.configure_mesh().draw()?;
177177

@@ -215,7 +215,7 @@ let figure = evcxr_figure((640, 480), |root| {
215215
.margin(5)
216216
.x_label_area_size(30)
217217
.y_label_area_size(30)
218-
.build_ranged(-1f32..1f32, -0.1f32..1f32)?;
218+
.build_cartesian_2d(-1f32..1f32, -0.1f32..1f32)?;
219219
220220
chart.configure_mesh().draw()?;
221221

doc-template/examples/quick_start.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
77
.margin(5)
88
.x_label_area_size(30)
99
.y_label_area_size(30)
10-
.build_ranged(-1f32..1f32, -0.1f32..1f32)?;
10+
.build_cartesian_2d(-1f32..1f32, -0.1f32..1f32)?;
1111

1212
chart.configure_mesh().draw()?;
1313

doc-template/readme.template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ let figure = evcxr_figure((640, 480), |root| {
6868
.margin(5)
6969
.x_label_area_size(30)
7070
.y_label_area_size(30)
71-
.build_ranged(-1f32..1f32, -0.1f32..1f32)?;
71+
.build_cartesian_2d(-1f32..1f32, -0.1f32..1f32)?;
7272
7373
chart.configure_mesh().draw()?;
7474

src/chart/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use plotters_backend::DrawingBackend;
2121
/// let chart = ChartBuilder::on(&area[0])
2222
/// .caption("Incremental Example", ("sans-serif", 20))
2323
/// .set_all_label_area_size(30)
24-
/// .build_ranged(0..10, 0..10)
24+
/// .build_cartesian_2d(0..10, 0..10)
2525
/// .expect("Unable to build ChartContext");
2626
/// // Draw the first frame at this point
2727
/// area[0].present().expect("Present");

src/coord/ranged1d/combinators/ckps.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ where
103103
///let mut buffer = vec![0;1024*768*3];
104104
/// let root = BitMapBackend::with_buffer(&mut buffer, (1024, 768)).into_drawing_area();
105105
/// let mut chart = ChartBuilder::on(&root)
106-
/// .build_ranged(
106+
/// .build_cartesian_2d(
107107
/// (0..100).with_key_points(vec![1,20,50,90]), // <= This line will make the plot shows 4 tick marks at 1, 20, 50, 90
108108
/// 0..10
109109
/// ).unwrap();
@@ -143,7 +143,7 @@ where
143143
///let mut buffer = vec![0;1024*768*3];
144144
/// let root = BitMapBackend::with_buffer(&mut buffer, (1024, 768)).into_drawing_area();
145145
/// let mut chart = ChartBuilder::on(&root)
146-
/// .build_ranged(
146+
/// .build_cartesian_2d(
147147
/// (0..100).with_key_point_func(|n| (0..100 / n as i32).map(|x| x * 100 / n as i32).collect()),
148148
/// 0..10
149149
/// ).unwrap();

src/coord/ranged1d/combinators/group_by.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::ops::Range;
1818
///let mut buf = vec![0;1024*768*3];
1919
///let area = BitMapBackend::with_buffer(buf.as_mut(), (1024, 768)).into_drawing_area();
2020
///let chart = ChartBuilder::on(&area)
21-
/// .build_ranged((0..100).group_by(7), 0..100)
21+
/// .build_cartesian_2d((0..100).group_by(7), 0..100)
2222
/// .unwrap();
2323
///```
2424
///

src/element/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
.x_label_area_size(40)
130130
.y_label_area_size(40)
131131
.margin(5)
132-
.build_ranged(0..50, 0..10)?;
132+
.build_cartesian_2d(0..50, 0..10)?;
133133
134134
chart
135135
.configure_mesh()

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
310310
.margin(5)
311311
.x_label_area_size(30)
312312
.y_label_area_size(30)
313-
.build_ranged(-1f32..1f32, -0.1f32..1f32)?;
313+
.build_cartesian_2d(-1f32..1f32, -0.1f32..1f32)?;
314314
315315
chart.configure_mesh().draw()?;
316316
@@ -354,7 +354,7 @@ let figure = evcxr_figure((640, 480), |root| {
354354
.margin(5)
355355
.x_label_area_size(30)
356356
.y_label_area_size(30)
357-
.build_ranged(-1f32..1f32, -0.1f32..1f32)?;
357+
.build_cartesian_2d(-1f32..1f32, -0.1f32..1f32)?;
358358
359359
chart.configure_mesh().draw()?;
360360

0 commit comments

Comments
 (0)