Skip to content

Commit 1e8199d

Browse files
committed
Fix typos
1 parent 6879002 commit 1e8199d

File tree

24 files changed

+68
-68
lines changed

24 files changed

+68
-68
lines changed

CHANGELOG.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
### Improved
4343

44-
- Improved documentaiton for predefined colors. (Thanks to @siefkenj)
44+
- Improved documentation for predefined colors. (Thanks to @siefkenj)
4545
- Introduce the full Material Design 2014 Color Palette. (Thanks to @siefkenj)
4646
- Massive documentation improvements (Thanks to @facorread and many others)
4747

@@ -60,19 +60,19 @@
6060

6161
### Fixed
6262

63-
- Infinte loop / panic when the axis range is zero
63+
- Infinite loop / panic when the axis range is zero
6464
- UB in minifb example (thanks to TheEdward162)
6565
- Examples that uses old APIs (thanks to chrisduerr)
6666

6767
## Plotters 0.3.0 (2020-09-03)
6868

69-
This is the next major release of Plotters, see [release notes](./RELEASE-NOTES.md) for more detials.
69+
This is the next major release of Plotters, see [release notes](./RELEASE-NOTES.md) for more details.
7070

7171
### Added
7272

7373
- The plotters backend API crate is introduced which allows third-party backend.
7474
- Allow slice used as a coordinate if the item type implements `PartialOrd`.
75-
- Linspace coordinate type, which allows define a discrete coordinate on continous value types (such as f32, DateTime, etc) with a step specification
75+
- Linspace coordinate type, which allows define a discrete coordinate on continuous value types (such as f32, DateTime, etc) with a step specification
7676
- Nested coordinate type, now we support define pair of category and nested values as nested coordinate.
7777
- Introduce backend crates: plotters-bitmap, plotters-svg, plotters-cairo, plotters-canvas, plotters-console
7878
- 3D Plotting features
@@ -83,7 +83,7 @@ This is the next major release of Plotters, see [release notes](./RELEASE-NOTES.
8383

8484
### Improvement
8585

86-
- Enhanced key point algorithms: New key point hint trait are used for key point algorithms && many improvment on key point algorithms for different types
86+
- Enhanced key point algorithms: New key point hint trait are used for key point algorithms && many improvement on key point algorithms for different types
8787
- Renamed `MeshStyle::line\_style\_1` and `MeshStyle::line\_style\_2` to `bold\_line\_style` and `light\_line\_style`
8888
- Reorganize the "plotters::coord" namespace
8989
- Improved discrete coordinate trait
@@ -128,7 +128,7 @@ This is the next major release of Plotters, see [release notes](./RELEASE-NOTES.
128128
- Incremental Rendering by saving the previous chart context into a state and restore it on a different drawing area.
129129
- BoxPlot support (See boxplot example for more details) (Thanks to @nuald)
130130
- Category coordinate spec which allows use a list of given values as coordinate (Thanks to @nuald)
131-
- New text positioning model which allows develvoper sepecify the anchor point. This is critical for layouting SVG correctly. See `plotters::style::text::text_anchor` for details. (Thanks to @nuald)
131+
- New text positioning model which allows develvoper specify the anchor point. This is critical for layouting SVG correctly. See `plotters::style::text::text_anchor` for details. (Thanks to @nuald)
132132

133133
### Improved
134134

@@ -147,9 +147,9 @@ This is the next major release of Plotters, see [release notes](./RELEASE-NOTES.
147147

148148
- Font description is greatly improved, general font family is supported: `serif`, `serif-sans`, `monospace` (Thanks to @Tatrix)
149149
- Tested the font loading on Linux, OSX and Windowns. Make font loading more reliable.
150-
- `BitMapBackend` isn't depdends on `image` crate now. Only the image encoding part relies on the `image` crate
150+
- `BitMapBackend` isn't depends on `image` crate now. Only the image encoding part relies on the `image` crate
151151
- Refactored WASM demo use ES6 and `wasm-pack` (Thanks to @Tatrix)
152-
- Label style for X axis and Y axis can be set seperately now using `x\_label\_style` and `y\_label\_style`. (Thanks to @zhiburt)
152+
- Label style for X axis and Y axis can be set separately now using `x\_label\_style` and `y\_label\_style`. (Thanks to @zhiburt)
153153

154154
## Plotters 0.2.10 (2019-10-23)
155155

RELEASE-NOTES.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ more and more backend is supported, those backend implementation cause a huge ma
1515

1616
For example, when `cairo-rs` crate is updated, plotters should release a new version with updated `cairo-rs` dependency for
1717
our cairo backend. However, most of the users doesn't actually use this backend and pushing new version for updating cairo backend
18-
seems to be annoying for most of the people. As more and more backend is added, the depdendency is out of control.
18+
seems to be annoying for most of the people. As more and more backend is added, the dependency is out of control.
1919

2020
### Details
2121

@@ -74,7 +74,7 @@ Plotters 0.3 ships with tons of improvement made in the coordinate abstraction a
7474

7575
* `chrono::NaiveDate` and `chrono::NaiveDateTime` are now supported
7676
* Better abstraction of discrete coordinates
77-
* Linspace coordinate, which can be used converting a continous coorindate into a discrete buckets
77+
* Linspace coordinate, which can be used converting a continuous coorindate into a discrete buckets
7878
* Nested coordinate
7979
* Slices can now be used as cooradnite specification, which allows people define an axis of category.
8080
* 3D Coordinate is now supported

plotters-backend/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plotters project, please check the [main crate](https://crates.io/crates/plotters).
44
55
This is the crate that used as the connector between Plotters and different backend crates. Since Plotters 0.3, all the backends has been
6-
hosted as seperate crates for the usability and maintainability reasons.
6+
hosted as separate crates for the usability and maintainability reasons.
77
88
At the same time, Plotters is now supporting third-party backends and all the backends are now supports "plug-and-play":
99
To use a external backend, just depends on both the Plotters main crate and the third-party backend crate.
@@ -16,7 +16,7 @@
1616
1717
If the backend only implements [DrawingBackend::draw_pixel](trait.DrawingBackend.html#tymethod.draw_pixel), the default CPU rasterizer will be
1818
used to give your backend ability of drawing different shapes. For those backend that supports advanced drawing instructions, such as, GPU
19-
acelerated shape drawing, all the provided trait method can be overriden from the specific backend code.
19+
accelerated shape drawing, all the provided trait method can be overridden from the specific backend code.
2020
2121
If your backend have text rendering ability, you may want to override the [DrawingBackend::estimate_text_size](trait.DrawingBackend.html#tymethod.estimate_text_size)
2222
to avoid wrong spacing, since the Plotters default text handling code may behaves differently from the backend in terms of text rendering.
@@ -48,12 +48,12 @@
4848
- For dynamic drawing, frames are defined by invocation of `DrawingBackend::present`, everything prior the invocation should belongs to previous frame
4949
5050
# Compatibility Note
51-
Since Plotters v0.3, plotters use the "plug-and-play" schema to import backends, this requires both Plotters and the backend crates depdens on a
51+
Since Plotters v0.3, plotters use the "plug-and-play" schema to import backends, this requires both Plotters and the backend crates depends on a
5252
same version of `plotters-backend` crate. This crate (`plotters-backend`) will enforce that any revision (means the last number in a version number)
5353
won't contains breaking change - both on the Plotters side and backend side.
5454
5555
Plotters main crate is always importing the backend crate with version specification `plotters-backend = "^<major>.<minor>*"`.
56-
It's highly recommended that all the external crates follows the same rule to import `plotters-backend` depdendency, to avoid protential breaking
56+
It's highly recommended that all the external crates follows the same rule to import `plotters-backend` dependency, to avoid potential breaking
5757
caused by `plotters-backend` crates gets a revision update.
5858
5959
We also impose a versioning rule with `plotters` and some backends:

plotters-backend/src/rasterizer/circle.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ fn draw_part_c<
5353
let (x0, x1) = ((-half_size).ceil() as i32, half_size.floor() as i32);
5454

5555
for x in x0..x1 {
56-
let outter_y0 = ((r_limit as f64) * (r_limit as f64) - x as f64 * x as f64).sqrt();
56+
let outer_y0 = ((r_limit as f64) * (r_limit as f64) - x as f64 * x as f64).sqrt();
5757
let inner_y0 = r as f64 - 1.0;
58-
let mut y1 = outter_y0.min(inner_y0);
58+
let mut y1 = outer_y0.min(inner_y0);
5959
let y0 = ((r as f64) * (r as f64) - x as f64 * x as f64).sqrt();
6060

6161
if y0 > y1 {
@@ -69,9 +69,9 @@ fn draw_part_c<
6969
}
7070

7171
for x in x1 + 1..r {
72-
let outter_y0 = ((r_limit as f64) * (r_limit as f64) - x as f64 * x as f64).sqrt();
72+
let outer_y0 = ((r_limit as f64) * (r_limit as f64) - x as f64 * x as f64).sqrt();
7373
let inner_y0 = r as f64 - 1.0;
74-
let y0 = outter_y0.min(inner_y0);
74+
let y0 = outer_y0.min(inner_y0);
7575
let y1 = x as f64;
7676

7777
if y1 < y0 {
@@ -220,52 +220,52 @@ fn draw_annulus<B: DrawingBackend, S: BackendStyle>(
220220
));
221221

222222
let d_inner = ((radius.1 as f64) / (2f64).sqrt()) as i32;
223-
let d_outter = (((radius.0 as f64) / (2f64).sqrt()) as i32).min(radius.1 as i32 - 1);
224-
let d_outter_actually = (radius.1 as i32).min(
223+
let d_outer = (((radius.0 as f64) / (2f64).sqrt()) as i32).min(radius.1 as i32 - 1);
224+
let d_outer_actually = (radius.1 as i32).min(
225225
(radius.0 as f64 * radius.0 as f64 - radius.1 as f64 * radius.1 as f64 / 2.0)
226226
.sqrt()
227227
.ceil() as i32,
228228
);
229229

230230
check_result!(b.draw_line(
231231
(center.0 - d_inner, center.1 - d_inner),
232-
(center.0 - d_outter, center.1 - d_outter),
232+
(center.0 - d_outer, center.1 - d_outer),
233233
&style.color()
234234
));
235235
check_result!(b.draw_line(
236236
(center.0 + d_inner, center.1 - d_inner),
237-
(center.0 + d_outter, center.1 - d_outter),
237+
(center.0 + d_outer, center.1 - d_outer),
238238
&style.color()
239239
));
240240
check_result!(b.draw_line(
241241
(center.0 - d_inner, center.1 + d_inner),
242-
(center.0 - d_outter, center.1 + d_outter),
242+
(center.0 - d_outer, center.1 + d_outer),
243243
&style.color()
244244
));
245245
check_result!(b.draw_line(
246246
(center.0 + d_inner, center.1 + d_inner),
247-
(center.0 + d_outter, center.1 + d_outter),
247+
(center.0 + d_outer, center.1 + d_outer),
248248
&style.color()
249249
));
250250

251251
check_result!(b.draw_line(
252252
(center.0 - d_inner, center.1 + d_inner),
253-
(center.0 - d_outter_actually, center.1 + d_inner),
253+
(center.0 - d_outer_actually, center.1 + d_inner),
254254
&style.color()
255255
));
256256
check_result!(b.draw_line(
257257
(center.0 + d_inner, center.1 - d_inner),
258-
(center.0 + d_inner, center.1 - d_outter_actually),
258+
(center.0 + d_inner, center.1 - d_outer_actually),
259259
&style.color()
260260
));
261261
check_result!(b.draw_line(
262262
(center.0 + d_inner, center.1 + d_inner),
263-
(center.0 + d_inner, center.1 + d_outter_actually),
263+
(center.0 + d_inner, center.1 + d_outer_actually),
264264
&style.color()
265265
));
266266
check_result!(b.draw_line(
267267
(center.0 + d_inner, center.1 + d_inner),
268-
(center.0 + d_outter_actually, center.1 + d_inner),
268+
(center.0 + d_outer_actually, center.1 + d_inner),
269269
&style.color()
270270
));
271271

plotters-backend/src/rasterizer/path.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn compute_polygon_vertex(triple: &[BackendCoord; 3], d: f64, buf: &mut Vec<Back
6464
let mut x = f64::INFINITY;
6565
let mut y = f64::INFINITY;
6666

67-
// Well if the determinant is not 0, then we can actuall get a intersection point.
67+
// Well if the determinant is not 0, then we can actually get a intersection point.
6868
if (a0 * b1 - a1 * b0).abs() > f64::EPSILON {
6969
let u = (c0 * b1 - c1 * b0) / (a0 * b1 - a1 * b0);
7070

@@ -74,7 +74,7 @@ fn compute_polygon_vertex(triple: &[BackendCoord; 3], d: f64, buf: &mut Vec<Back
7474

7575
let cross_product = a_t.0 * b_t.1 - a_t.1 * b_t.0;
7676
if (cross_product < 0.0 && d < 0.0) || (cross_product > 0.0 && d > 0.0) {
77-
// Then we are at the outter side of the angle, so we need to consider a cap.
77+
// Then we are at the outer side of the angle, so we need to consider a cap.
7878
let dist_square = (x - triple[1].0 as f64).powi(2) + (y - triple[1].1 as f64).powi(2);
7979
// If the point is too far away from the line, we need to cap it.
8080
if dist_square > d * d * 16.0 {

plotters-backend/src/text.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ impl<'a> From<&'a str> for FontStyle {
188188
/// text drawing, those font information provides instructions about how the text should be
189189
/// rendered: color, size, slant, anchor, font, etc.
190190
///
191-
/// This trait decouples the detailed implementaiton about the font and the backend code which
192-
/// wants to perfome some operation on the font.
191+
/// This trait decouples the detailed implementation about the font and the backend code which
192+
/// wants to perform some operation on the font.
193193
///
194194
pub trait BackendTextStyle {
195195
/// The error type of this text style implementation

plotters-bitmap/src/bitmap.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use target::{Buffer, Target};
2828
/// `BitMapBackend`, not just `drop` it or allow it to go out of scope.
2929
///
3030
/// If the `BitMapBackend` is just dropped, it will make a best effort attempt to write the
31-
/// generated charts to the output file, but any errors that occcur (such as inability to
31+
/// generated charts to the output file, but any errors that occur (such as inability to
3232
/// create the output file) will be silently ignored.
3333
pub struct BitMapBackend<'a, P: PixelFormat = RGBPixel> {
3434
/// The path to the image
@@ -95,7 +95,7 @@ impl<'a> BitMapBackend<'a, RGBPixel> {
9595
/// in RGB pixel format.
9696
///
9797
/// Note: This function provides backward compatibility for those code that assumes Plotters
98-
/// uses RGB pixel format and maniuplates the in-memory framebuffer.
98+
/// uses RGB pixel format and manipulates the in-memory framebuffer.
9999
/// For more pixel format option, use `with_buffer_and_format` instead.
100100
///
101101
/// - `buf`: The buffer to operate
@@ -141,7 +141,7 @@ impl<'a, P: PixelFormat> BitMapBackend<'a, P> {
141141
/// multi-threading rendering.
142142
///
143143
/// - `area_size`: The size of the area
144-
/// - **returns**: The splitted backends that can be rendered in parallel
144+
/// - **returns**: The split backends that can be rendered in parallel
145145
pub fn split(&mut self, area_size: &[u32]) -> Vec<BitMapBackend<P>> {
146146
let (w, h) = self.get_size();
147147
let buf = self.get_raw_pixel_buffer();

plotters-bitmap/src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use image::ImageError;
66
pub enum BitMapBackendError {
77
/// The buffer provided is invalid, for example, wrong pixel buffer size
88
InvalidBuffer,
9-
/// Some IO error occurs while the bitmap maniuplation
9+
/// Some IO error occurs while the bitmap manipulation
1010
IOError(std::io::Error),
1111
#[cfg(all(feature = "gif", not(target_arch = "wasm32"), feature = "image"))]
1212
GifEncodingError(gif::EncodingError),

plotters/examples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
To run any example, from within the repo, run `cargo run --example <example_name>` where `<example name>` is the name of the file without the `.rs` extension.
66

7-
All the examples assumes the directory [plotters-doc-data](https://github.com/38/plotters-doc-data) exists, otherwise those example crashs.
7+
All the examples assumes the directory [plotters-doc-data](https://github.com/38/plotters-doc-data) exists, otherwise those example crashes.
88

99
The output of these example files are used to generate the [plotters-doc-data](https://github.com/38/plotters-doc-data) repo that populates the sample images in the main README.
1010
We also rely on the output of examples to detect potential layout changes.

plotters/src/chart/dual_coord.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::element::{Drawable, PointCollection};
1717
use plotters_backend::{BackendCoord, DrawingBackend};
1818

1919
/// The chart context that has two coordinate system attached.
20-
/// This situation is quite common, for example, we with two different coodinate system.
20+
/// This situation is quite common, for example, we with two different coordinate system.
2121
/// For instance this example <img src="https://plotters-rs.github.io/plotters-doc-data/twoscale.png"></img>
2222
/// This is done by attaching a second coordinate system to ChartContext by method [ChartContext::set_secondary_coord](struct.ChartContext.html#method.set_secondary_coord).
2323
/// For instance of dual coordinate charts, see [this example](https://github.com/plotters-rs/plotters/blob/master/examples/two-scales.rs#L15).

plotters/src/chart/state.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl<'a, DB: DrawingBackend, CT: CoordTranslate> From<ChartContext<'a, DB, CT>>
5050

5151
impl<'a, DB: DrawingBackend, CT: CoordTranslate> ChartContext<'a, DB, CT> {
5252
/// Convert a chart context into a chart state, by doing so, the chart context is consumed and
53-
/// a saved chart state is created for later use. This is typically used in incrmental rendering. See documentation of `ChartState` for more detailed example.
53+
/// a saved chart state is created for later use. This is typically used in incremental rendering. See documentation of `ChartState` for more detailed example.
5454
pub fn into_chart_state(self) -> ChartState<CT> {
5555
self.into()
5656
}

plotters/src/coord/ranged1d/combinators/ckps.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::coord::ranged1d::{AsRangedCoord, DiscreteRanged, KeyPointHint, Ranged
1111
/// This decorator allows customized tick mark specifiied by vector.
1212
/// See [BindKeyPoints::with_key_points](trait.BindKeyPoints.html#tymethod.with_key_points)
1313
/// for details.
14-
/// Note: For any coordinate spec wrapped by this decorator, the maxium number of labels configured by
14+
/// Note: For any coordinate spec wrapped by this decorator, the maximum number of labels configured by
1515
/// MeshStyle will be ignored and the key point function will always returns the entire vector
1616
pub struct WithKeyPoints<Inner: Ranged> {
1717
inner: Inner,
@@ -122,7 +122,7 @@ where
122122
impl<T: AsRangedCoord> BindKeyPoints for T {}
123123

124124
/// The coordinate decorator that allows customized keypoint algorithms.
125-
/// Normally, all the coordinate spec implements its own key point algorith
125+
/// Normally, all the coordinate spec implements its own key point algorithm
126126
/// But this decorator allows you override the pre-defined key point algorithm.
127127
///
128128
/// To use this decorator, see [BindKeyPointMethod::with_key_point_func](trait.BindKeyPointMethod.html#tymethod.with_key_point_func)

plotters/src/coord/ranged1d/combinators/group_by.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ impl<T: DiscreteRanged> Ranged for GroupBy<T> {
8282
let idx_iter = (0..hint.bold_points()).map(|x| x * interval);
8383

8484
if hint.weight().allow_light_points() && count < hint.bold_points() * 2 {
85-
let outter_ticks = idx_iter;
86-
let outter_tick_size = interval * self.1;
87-
let inner_ticks_per_group = hint.max_num_points() / outter_ticks.len();
85+
let outer_ticks = idx_iter;
86+
let outer_tick_size = interval * self.1;
87+
let inner_ticks_per_group = hint.max_num_points() / outer_ticks.len();
8888
let inner_ticks =
89-
(outter_tick_size + inner_ticks_per_group - 1) / inner_ticks_per_group;
90-
let inner_ticks: Vec<_> = (0..(outter_tick_size / inner_ticks))
89+
(outer_tick_size + inner_ticks_per_group - 1) / inner_ticks_per_group;
90+
let inner_ticks: Vec<_> = (0..(outer_tick_size / inner_ticks))
9191
.map(move |x| x * inner_ticks)
9292
.collect();
9393
let size = self.0.size();
94-
return outter_ticks
94+
return outer_ticks
9595
.flat_map(|base| inner_ticks.iter().map(move |&ofs| base * self.1 + ofs))
9696
.take_while(|&idx| idx < size)
9797
.map(|x| self.0.from_index(x).unwrap())

plotters/src/coord/ranged1d/combinators/linspace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ where
152152
}
153153
}
154154

155-
/// The coordinate combinator that transform a continous coordinate to a discrete coordinate
155+
/// The coordinate combinator that transform a continuous coordinate to a discrete coordinate
156156
/// to a discrete coordinate by a giving step.
157157
///
158158
/// For example, range `0f32..100f32` is a continuous coordinate, thus this prevent us having a

0 commit comments

Comments
 (0)