From 5252b25a62c4bcf5492dc13b434e0f023b196abe Mon Sep 17 00:00:00 2001 From: Nickolas Fotopoulos Date: Wed, 25 Sep 2024 21:52:02 -0700 Subject: [PATCH] Fix typo: cubiod -> cuboid --- plotters/src/element/basic_shapes_3d.rs | 14 +++++++------- plotters/src/element/mod.rs | 2 +- plotters/src/lib.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plotters/src/element/basic_shapes_3d.rs b/plotters/src/element/basic_shapes_3d.rs index 97b15e62..dd95a828 100644 --- a/plotters/src/element/basic_shapes_3d.rs +++ b/plotters/src/element/basic_shapes_3d.rs @@ -14,25 +14,25 @@ drawing_area.fill(&WHITE).unwrap(); let mut chart_builder = ChartBuilder::on(&drawing_area); let mut chart_context = chart_builder.margin(20).build_cartesian_3d(0.0..3.5, 0.0..2.5, 0.0..1.5).unwrap(); chart_context.configure_axes().x_labels(4).y_labels(3).z_labels(2).draw().unwrap(); -let cubiod = Cubiod::new([(0.,0.,0.), (3.,2.,1.)], BLUE.mix(0.2), BLUE); -chart_context.draw_series(std::iter::once(cubiod)).unwrap(); +let cuboid = Cuboid::new([(0.,0.,0.), (3.,2.,1.)], BLUE.mix(0.2), BLUE); +chart_context.draw_series(std::iter::once(cuboid)).unwrap(); ``` The result is a semi-transparent cuboid with blue edges: ![](https://cdn.jsdelivr.net/gh/facorread/plotters-doc-data@b6703f7/apidoc/cuboid.svg) */ -pub struct Cubiod { +pub struct Cuboid { face_style: ShapeStyle, edge_style: ShapeStyle, vert: [(X, Y, Z); 8], } -impl Cubiod { +impl Cuboid { /** Creates a cuboid. - See [`Cubiod`] for more information and examples. + See [`Cuboid`] for more information and examples. */ #[allow(clippy::redundant_clone)] pub fn new, ES: Into>( @@ -58,7 +58,7 @@ impl Cubiod { } impl<'a, X: 'a, Y: 'a, Z: 'a> PointCollection<'a, (X, Y, Z), BackendCoordAndZ> - for &'a Cubiod + for &'a Cuboid { type Point = &'a (X, Y, Z); type IntoIter = &'a [(X, Y, Z)]; @@ -67,7 +67,7 @@ impl<'a, X: 'a, Y: 'a, Z: 'a> PointCollection<'a, (X, Y, Z), BackendCoordAndZ> } } -impl Drawable for Cubiod { +impl Drawable for Cuboid { fn draw>( &self, points: I, diff --git a/plotters/src/element/mod.rs b/plotters/src/element/mod.rs index 921b2c0f..df9a62ae 100644 --- a/plotters/src/element/mod.rs +++ b/plotters/src/element/mod.rs @@ -276,7 +276,7 @@ impl CoordMapper for BackendCoordOnly { /** Used for 3d coordinate transformations. -See [`Cubiod`] for more information and an example. +See [`Cuboid`] for more information and an example. */ pub struct BackendCoordAndZ; diff --git a/plotters/src/lib.rs b/plotters/src/lib.rs index 230c679f..d099db9a 100644 --- a/plotters/src/lib.rs +++ b/plotters/src/lib.rs @@ -871,7 +871,7 @@ pub mod prelude { // Elements pub use crate::element::{ - Circle, Cross, Cubiod, DynElement, EmptyElement, IntoDynElement, MultiLineText, + Circle, Cross, Cuboid, DynElement, EmptyElement, IntoDynElement, MultiLineText, PathElement, Pie, Pixel, Polygon, Rectangle, Text, TriangleMarker, };