Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typos #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions markdown/basic/animate.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
13 changes: 6 additions & 7 deletions markdown/basic/basic_data_plotting.md
Original file line number Diff line number Diff line change
@@ -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::*;
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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::*;
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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::*;
Expand Down
8 changes: 4 additions & 4 deletions markdown/basic/draw_3d_plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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::*;
Expand Down Expand Up @@ -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::*;
Expand Down Expand Up @@ -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::*;
Expand Down
4 changes: 2 additions & 2 deletions markdown/basic/multipanel.md
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -72,4 +72,4 @@ fn main() {
}
```

![multipanel](../../images/multi-panel-figure.png)
![multipanel](../../images/multi-panel-figure.png)
10 changes: 5 additions & 5 deletions markdown/tweak/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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::*;
Expand All @@ -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::*;
Expand Down Expand Up @@ -88,4 +88,4 @@ fn main() {
}
```

![overlapped](../../images/overlapped.png)
![overlapped](../../images/overlapped.png)