diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -117,6 +117,10 @@ To view the source code for each example, please click on the example image. <img src="https://plotters-rs.github.io/plotters-doc-data/boxplot.svg" class="galleryItem" width=200px></img> </a> +<a href="https://github.com/38/plotters/blob/master/examples/3d-plot.rs"> + <img src="https://plotters-rs.github.io/plotters-doc-data/3d-plot.svg" class="galleryItem" width=200px></img> +</a> + ## Table of Contents * [Gallery](#gallery) @@ -143,7 +147,7 @@ To view the source code for each example, please click on the example image. To use Plotters, you can simply add Plotters into your `Cargo.toml` ```toml [dependencies] -plotters = "^0.2.15" +plotters = "^0.3.0" ``` And the following code draws a quadratic function. `src/main.rs`, @@ -363,13 +367,14 @@ For example, we can have an element which includes a dot and its coordinate. ```rust use plotters::prelude::*; +use plotters::coord::types::RangedCoordf32; fn main() -> Result<(), Box<dyn std::error::Error>> { let root = BitMapBackend::new("plotters-doc-data/4.png", (640, 480)).into_drawing_area(); root.fill(&RGBColor(240, 200, 200))?; - let root = root.apply_coord_spec(RangedCoord::<RangedCoordf32, RangedCoordf32>::new( + let root = root.apply_coord_spec(Cartesian2d::<RangedCoordf32, RangedCoordf32>::new( 0f32..1f32, 0f32..1f32, (0..640, 0..480), @@ -415,7 +420,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { .x_label_area_size(20) .y_label_area_size(40) // Finally attach a coordinate on the drawing area and make a chart context - .build_ranged(0f32..10f32, 0f32..10f32)?; + .build_cartesian_2d(0f32..10f32, 0f32..10f32)?; // Then we can draw a mesh chart @@ -486,15 +491,13 @@ By doing so, you can minimize the number of dependencies down to only `itertools The following list is a complete list of features that can be opt in and out. -- Drawing backends related features +- Tier 1 drawing backends | Name | Description | Additional Dependency |Default?| |---------|--------------|--------|------------| -| image\_encoder | Allow `BitMapBackend` save the result to bitmap files | image, rusttype, font-kit | Yes | -| svg | Enable `SVGBackend` Support | None | Yes | -| gif\_backend| Opt-in GIF animation Rendering support for `BitMapBackend`, implies `bitmap` enabled | gif | Yes | -| piston | Enable `PistonWindowBackend` | piston\_window, rusttype, font-kit | No | -| cairo | Enable `CairoBackend` | cairo-rs, rusttype, font-kit | No | +| bitmap\_encoder | Allow `BitMapBackend` save the result to bitmap files | image, rusttype, font-kit | Yes | +| svg\_backend | Enable `SVGBackend` Support | None | Yes | +| bitmap\_gif| Opt-in GIF animation Rendering support for `BitMapBackend`, implies `bitmap` enabled | gif | Yes | - Font manipulation features |