@@ -158,15 +158,20 @@ To view the source code for each example, please click on the example image.
158
158
159
159
``` sudo apt install pkg-config libfreetype6-dev libfontconfig1-dev ```
160
160
161
+ ### Fedora Linux
162
+
163
+ ``` sudo dnf install pkgconf freetype-devel fontconfig-devel ```
164
+
161
165
## Quick Start
162
166
163
167
To use Plotters, you can simply add Plotters into your ` Cargo.toml `
164
168
``` toml
165
169
[dependencies ]
166
170
plotters = " 0.3.3"
167
171
```
172
+ Create the subdirectory ` <Cargo project dir>/plotters-doc-data `
168
173
169
- And the following code draws a quadratic function. ` src/main.rs ` ,
174
+ And the following code draws a quadratic function. ` src/main.rs ` writes the chart to ` plotters-doc-data/0.png `
170
175
171
176
``` rust
172
177
use plotters :: prelude :: * ;
@@ -221,7 +226,7 @@ The feature `evcxr` should be enabled when including Plotters to Jupyter Noteboo
221
226
The following code shows a minimal example of this.
222
227
223
228
``` text
224
- :dep plotters = { version = "^0.3.6", default_features = false, features = ["evcxr", "all_series", "all_elements"] }
229
+ :dep plotters = { version = "^0.3.6", default-features = false, features = ["evcxr", "all_series", "all_elements"] }
225
230
extern crate plotters;
226
231
use plotters::prelude::*;
227
232
@@ -499,7 +504,7 @@ plotters = { git = "https://github.com/plotters-rs/plotters.git" }
499
504
500
505
### Reducing Depending Libraries && Turning Off Backends
501
506
Plotters now supports use features to control the backend dependencies. By default, ` BitMapBackend ` and ` SVGBackend ` are supported,
502
- use ` default_features = false` in the dependency description in ` Cargo.toml ` and you can cherry-pick the backend implementations.
507
+ use ` default-features = false` in the dependency description in ` Cargo.toml ` and you can cherry-pick the backend implementations.
503
508
504
509
- ` svg ` Enable the ` SVGBackend `
505
510
- ` bitmap ` Enable the ` BitMapBackend `
@@ -508,16 +513,16 @@ For example, the following dependency description would avoid compiling with bit
508
513
509
514
``` toml
510
515
[dependencies ]
511
- plotters = { git = " https://github.com/plotters-rs/plotters.git" , default_features = false , features = [" svg" ] }
516
+ plotters = { git = " https://github.com/plotters-rs/plotters.git" , default-features = false , features = [" svg" ] }
512
517
```
513
518
514
519
The library also allows consumers to make use of the [ ` Palette ` ] ( https://crates.io/crates/palette/ ) crate's color types by default.
515
- This behavior can also be turned off by setting ` default_features = false` .
520
+ This behavior can also be turned off by setting ` default-features = false` .
516
521
517
522
### List of Features
518
523
519
524
This is the full list of features that is defined by ` Plotters ` crate.
520
- Use ` default_features = false` to disable those default enabled features,
525
+ Use ` default-features = false` to disable those default enabled features,
521
526
and then you should be able to cherry-pick what features you want to include into ` Plotters ` crate.
522
527
By doing so, you can minimize the number of dependencies down to only ` itertools ` and compile time is less than 6s.
523
528
0 commit comments