Skip to content

Commit f571854

Browse files
committed
Add example readme
1 parent dbb3195 commit f571854

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# plotters examples
22

3-
These are examples of plotters in use! Like in all Rust packages, examples can be built and run with `cargo`.
4-
53
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.
64

7-
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 beautiful images you see in the main README. For that reason, they must be run with `cargo` from within the repo, or you must change the output filename in the example code to a directory that exists.
5+
All the examples assumes the directory [plotters-doc-data](https://github.com/38/plotters-doc-data) exists, otherwise those example crashs.
6+
7+
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.
8+
We also relies on the output of examples to detect protential layout changes.
9+
For that reason, **they must be run with `cargo` from within the repo, or you must change the output filename in the example code to a directory that exists.**
810

911
The examples that have their own directories and `Cargo.toml` files work differently. They are run the same way you would a standalone project.

0 commit comments

Comments
 (0)