From 22cfbe4b75cff6b034bbce6f319f1effcad2222a Mon Sep 17 00:00:00 2001 From: Jesper Olsen <43079279+jesper-olsen@users.noreply.github.com> Date: Fri, 15 Mar 2024 09:19:08 -0600 Subject: [PATCH] typos --- markdown/basic/animate.md | 4 ++-- markdown/basic/basic_data_plotting.md | 13 ++++++------- markdown/basic/draw_3d_plots.md | 8 ++++---- markdown/basic/multipanel.md | 4 ++-- markdown/tweak/layout.md | 10 +++++----- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/markdown/basic/animate.md b/markdown/basic/animate.md index 969c54f..c541778 100644 --- a/markdown/basic/animate.md +++ b/markdown/basic/animate.md @@ -1,8 +1,8 @@ # Animation and realtime rendering -All the previous examples is static rendered images, in this part, we are going to show how to generate realtime or animated plots. To render a realtime or animated figure, you need to redraw the figure periodically: For a animated plot, you should render each frame, while for a GUI integration, you should handle the redraw request. +All the previous examples are of statically rendered images. In this section, we are going to show how to generate realtime or animated plots. To render a realtime or animated figure, you need to redraw the figure periodically: For an animated plot, you should render each frame, while for a GUI integration, you should handle the redraw request. -The realtime rendering semantics for Plotters is supported by the API `DrawingBackend::present`, which means we tell the drawing backend we are finishing drawing the current frame. The following drawing will belongs to the next frame. +The realtime rendering semantics for Plotters is supported by the API `DrawingBackend::present`, which means we tell the drawing backend we have finished drawing the current frame. The following drawing will belong to the next frame. At the same time, you need a backend that supports realtime rendering. When GIF support is enabled, the default `BitMapBackend` is able to produce animated images. The following example shows show. diff --git a/markdown/basic/basic_data_plotting.md b/markdown/basic/basic_data_plotting.md index 107ec8b..6ec9688 100644 --- a/markdown/basic/basic_data_plotting.md +++ b/markdown/basic/basic_data_plotting.md @@ -1,10 +1,10 @@ # Basic data plotting -In this section, let's use Plotters to produce different types of Plotting. Generally speaking, the API `ChartContext::draw_series` provides the functionality to draw any types of chart. In the following parts, let's discuss how to use it to render different types of plots. +In this section, we will use Plotters to produce different types of plots. The `ChartContext::draw_series` API provides the functionality to draw different chart types. In the following sections, we will explore some of the possibilities. ## Line series -The following code demonstrate how to draw a line series with Plotters +The following code demonstrates how to draw a line series with Plotters ```rust use plotters::prelude::*; @@ -85,7 +85,7 @@ fn main() { let mut ctx = ChartBuilder::on(&root_area) .set_label_area_size(LabelAreaPosition::Left, 40) .set_label_area_size(LabelAreaPosition::Bottom, 40) - .caption("Scatter Demo", ("sans-serif", 40)) + .caption("Area Chart Demo", ("sans-serif", 40)) .build_cartesian_2d(0..10, 0..50) .unwrap(); @@ -117,7 +117,7 @@ In practice, the histogram can be two things: For a bar plot, we can simply create with a iterator that yields a series of rectangle. The following code demonstrates how. The function `Rectangle::margin` is used to set a pixel based margin for the rectangle element. -One note here is we used tweaked the coordinate a little bit, we make the X coordinate segmented, so that the axis labels presents in the middle of the value segments. In plotters this is called a coordinate combinator, we are going to discuss the combinators in detail in the next chapter. +One note here is that we tweaked the coordinate a bit, we segmented the X coordinate, so that the axis labels center align with the segments. In plotters this is called a coordinate combinator, we are going to discuss the combinators in detail in the next chapter. ```rust use plotters::prelude::*; @@ -284,8 +284,7 @@ Result image: ## Customized series -Plotters allows you draw arbitrary types of series, even the one isn't built into the Plotters crate. Plotters uses a really simple abstraction for a data series: An iterator of drawable elements. Thus if you can make your own series an iterator of drawable element, it's a valid data series and can be -draw on a figure. +Plotters allows you to draw arbitrary types of series, even ones not built into the Plotters crate. Plotters uses a really simple abstraction for a data series: An iterator of drawable elements. Thus if you can make your own series an iterator of drawable elements, it's a valid data series and can be draw on a figure. ## Multiple Data Series @@ -333,7 +332,7 @@ Result image: ## Legend -Plotters allows user add legend on the figure. Specifically, Plotters called the it "series label". When you call `ChartContext::draw_series`, a result type that carries a handle to a series annotation is returned and you can use it to add a series label to that. After you complete the data plotting, `ChartContext::configure_series_label` can be called to configure and draw the collections of series label. The following example demonstrate how. +Plotters allows the user to add a legend on the figure. Specifically, Plotters calls this a "series label". When you call `ChartContext::draw_series`, a result type that carries a handle to a series annotation is returned and you can use it to add a series label. After you complete the data plotting, `ChartContext::configure_series_label` can be called to configure and draw the series labels. The following example demonstrate how. ```rust use plotters::prelude::*; diff --git a/markdown/basic/draw_3d_plots.md b/markdown/basic/draw_3d_plots.md index 4265a33..227d39f 100644 --- a/markdown/basic/draw_3d_plots.md +++ b/markdown/basic/draw_3d_plots.md @@ -4,7 +4,7 @@ Plotters also allows rendering 3D figures. Instead of using `build_cartesian_2d` ## 3D plotting environment && basic figure component -This following example demonstrate how to build a basic 3d plotting environment. Unlike 2d chart context, you need to configure `configure_axes` to build the basic component. +This following example demonstrate how to build a basic 3D plotting environment. Unlike 2d chart context, you need to configure `configure_axes` to build the basic component. ```rust use plotters::prelude::*; @@ -85,7 +85,7 @@ fn main() { ## 3D Surface -We can draw 3d surface as well by drawing a series of polygon. Here's an example of how to draw a surface plot. +We can draw a 3D surface by drawing a series of polygons. Here's an example of how to draw a surface plot. ```rust use plotters::prelude::*; @@ -133,7 +133,7 @@ fn main() { ### Drawing with surface series -**Note: This feature is only avaiable in development version** +**Note: This feature is only avaiable in the development version** ```rust use plotters_master::prelude::*; @@ -163,7 +163,7 @@ fn main() { ## Customize perspective matrix -Plotters also allows user override the default prespective matrix, by doing so, you can zoom and rotate the 3d figure. The following example demostrate how. +Plotters also allows the user to override the default prespective matrix; by doing so, you can zoom and rotate the 3D figure. The following example demostrate how. ```rust use plotters::prelude::*; diff --git a/markdown/basic/multipanel.md b/markdown/basic/multipanel.md index 7ab54c8..c8970ea 100644 --- a/markdown/basic/multipanel.md +++ b/markdown/basic/multipanel.md @@ -2,7 +2,7 @@ ## Splitting drawing areas -Plotters can support multiple panel figures very easily by splitting the drawing area into sub-drawing areas. The following code demonstrate how the drawing area is splitted. +Plotters can support multi-panel figures by splitting the drawing area into sub-drawing areas. The following code demonstrates how. ```rust use plotters::prelude::*; @@ -72,4 +72,4 @@ fn main() { } ``` -![multipanel](../../images/multi-panel-figure.png) \ No newline at end of file +![multipanel](../../images/multi-panel-figure.png) diff --git a/markdown/tweak/layout.md b/markdown/tweak/layout.md index 3700501..8a60a32 100644 --- a/markdown/tweak/layout.md +++ b/markdown/tweak/layout.md @@ -2,7 +2,7 @@ ## Label area size -To build a chart in Plotters, you need first define the axis specification and the dimension of the label areas. When a `ChartBuilder` is created, the label area size is set to 0, which means Plotters shouldn't draw the axis and tick marks. You can tweak the label area size with `ChartBuilder::set_label_area_size`. +To build a chart in Plotters, you first need to define the axis specification and the dimension of the label areas. When a `ChartBuilder` is created, the label area size is set to 0, which means Plotters shouldn't draw the axis and tick marks. You can tweak the label area size with `ChartBuilder::set_label_area_size`. ```rust use plotters::prelude::*; @@ -34,7 +34,7 @@ fn main() { ## Floating label area -Sometimes we want our axis is drawn on the top of the plot area, this can be done if you set label area size to negative. +Sometimes we want our axis to be drawn at the top of the plot area; this can be done if we set label area size to negative. ```rust use plotters::prelude::*; @@ -56,9 +56,9 @@ fn main() { ``` ![label-area-size](../../images/axis-overlapping-with-plot.png) -## Overlapped charts +## Overlapping charts -We have learned how to split the parent drawing area into some sub-drawing-area. But in some case, we want to intentionally set one chart on the top of another. This can be done by `DrawingArea::shirnk`. The following example demonstrates how. +We have learned how to split the parent drawing area into sub-drawing areas. But in some cases, we want to intentionally set one chart on the top of another. This can be done by `DrawingArea::shrink`. The following example demonstrates how. ```rust use plotters::prelude::*; @@ -88,4 +88,4 @@ fn main() { } ``` -![overlapped](../../images/overlapped.png) \ No newline at end of file +![overlapped](../../images/overlapped.png)