2
2
3
3
In this section, let's use Plotters to produce different types of Plotting.
4
4
Generally speaking, the API ` ChartContext::draw_series ` provides the functionality
5
- to draw any types of chart. In the following parts, let's dicuss how to use it to
5
+ to draw any types of chart. In the following parts, let's discuss how to use it to
6
6
render different types of plots.
7
7
8
8
## Line series
9
9
10
- The following code demostrate how to draw a line series with Plotters
10
+ The following code demonstrate how to draw a line series with Plotters
11
11
12
12
``` rust
13
13
use plotters :: prelude :: * ;
@@ -38,8 +38,8 @@ It should produce the following image
38
38
39
39
## Scatter Plot
40
40
41
- The following code demostrate how we can crate a scatter plot and use different pointing elements.
42
- In the example, we use ` Circle ` and ` TriagnleMarker ` pointing element for two different series.
41
+ The following code demonstrate how we can crate a scatter plot and use different pointing elements.
42
+ In the example, we use ` Circle ` and ` TriangleMarker ` pointing element for two different series.
43
43
44
44
In this example, we assume there are ` DATA1 ` and ` DATA2 ` defined. See the source for the details.
45
45
@@ -78,7 +78,7 @@ And this will produce the following image.
78
78
79
79
## Area chart
80
80
81
- The following demo demostrate how we can draw an area chart.
81
+ The following demo demonstrate how we can draw an area chart.
82
82
83
83
``` rust
84
84
use plotters :: prelude :: * ;
@@ -116,13 +116,13 @@ Result image:
116
116
117
117
## Histogram
118
118
119
- In practise , the histogram can be two things:
119
+ In practice , the histogram can be two things:
120
120
121
121
1 . A bar plot
122
122
2 . Or a bar plot that shows the distribution of values
123
123
124
124
For a bar plot, we can simply create with a iterator that yields a series of
125
- rectangle. The following code demostrates how. The function ` Rectangle::margin `
125
+ rectangle. The following code demonstrates how. The function ` Rectangle::margin `
126
126
is used to set a pixel based margin for the rectangle element.
127
127
128
128
``` rust
@@ -157,7 +157,7 @@ Result image:
157
157
158
158
![ 2.8.png] ( ../../images/2.8.png )
159
159
160
- Similary , the following code draws a vertical bar chart.
160
+ Similarly , the following code draws a vertical bar chart.
161
161
162
162
``` rust
163
163
use plotters :: prelude :: * ;
@@ -191,7 +191,7 @@ Result image:
191
191
192
192
![ 2.9.png] ( ../../images/2.9.png )
193
193
194
- For the second type of histogram, there's a ` Histograma ` series type is defined for this purpose.
194
+ For the second type of histogram, there's a ` Histogram ` series type is defined for this purpose.
195
195
196
196
## Time Series Chart
197
197
@@ -246,7 +246,7 @@ Result image:
246
246
247
247
## Customized series
248
248
249
- Plotters allows you draw abitrary types of series, even the one isn't built into the Plotters crate.
249
+ Plotters allows you draw arbitrary types of series, even the one isn't built into the Plotters crate.
250
250
Plotters uses a really simple abstraction for a data series: An iterator of drawable elements.
251
251
Thus if you can make your own series an iterator of drawable element, it's a valid data series and can be
252
252
draw on a figure.
@@ -255,7 +255,7 @@ draw on a figure.
255
255
256
256
257
257
258
- ## Mutiple Data Series
258
+ ## Multiple Data Series
259
259
260
260
By calling ` draw_series ` multiple time, Plotters is able to produce the multiple series plot.
261
261
Thus, we don't limit the developer's ability to put different types of plot series onto the same
@@ -308,7 +308,7 @@ When you call `ChartContext::draw_series`, a result type that carries a handle t
308
308
is returned and you can use it to add a series label to that.
309
309
310
310
After you complete the data plotting, ` ChartContext::configure_series_label ` can be called to configure and draw
311
- the collections of series label. The following example demostrate how.
311
+ the collections of series label. The following example demonstrate how.
312
312
313
313
``` rust
314
314
use plotters :: prelude :: * ;
0 commit comments