1#![warn(missing_docs)]
30#![warn(clippy::all)]
31#![warn(clippy::pedantic)]
32#![allow(clippy::module_name_repetitions)]
33
34pub mod core;
36
37pub mod backend;
39
40pub mod figure {
42 }
44
45pub mod plots;
47
48pub mod color;
50
51pub mod axes;
53
54pub mod legend;
56
57pub mod text;
59
60pub mod integration;
62
63pub mod output {
65 }
67
68pub mod style {
70 }
72
73pub mod error {
75 use thiserror::Error;
78
79 #[derive(Error, Debug)]
81 pub enum Error {
82 #[error("IO error: {0}")]
84 Io(#[from] std::io::Error),
85
86 #[error("Invalid data: {0}")]
88 InvalidData(String),
89
90 #[error("Rendering error: {0}")]
92 Rendering(String),
93 }
94
95 pub type Result<T> = std::result::Result<T, Error>;
97}
98
99pub mod prelude {
101 pub use crate::axes::{Axis, AxisPosition, LabelAlignment};
108 pub use crate::color::{Color, Colormap, Palette};
109 pub use crate::core::{Bounds, Canvas, DataSeries, Drawable, Point2D, Series};
110 pub use crate::error::{Error, Result};
111 pub use crate::legend::{
112 BarLegend, BarLegendPosition, HorizontalAlignment, Legend, LegendEntry, LegendPosition,
113 LegendShape, MarkerShape as LegendMarker,
114 };
115 pub use crate::plots::area::{AreaPlot, StackedAreaPlot};
116 pub use crate::plots::bar::{BarOrientation, BarPlot};
117 pub use crate::plots::boxplot::{BoxPlot, OutlierMethod};
118 pub use crate::plots::bubble::BubbleChart;
119 pub use crate::plots::datelistplot::{DateListPlot, DateListStyle};
120 pub use crate::plots::heatmap::{Heatmap, ValueFormat};
121 pub use crate::plots::histogram::{BinStrategy, Histogram};
122 pub use crate::plots::line::LinePlot;
123 pub use crate::plots::qq::{Distribution, PPPlot, QQPlot};
124 pub use crate::plots::scatter::{MarkerShape, MarkerStyle, ScatterPlot};
125 pub use crate::plots::stacked_bar::StackedBarPlot;
126 pub use crate::plots::timeline::{Timeline, TimelineOrientation};
127 pub use crate::plots::treemap::Treemap;
128 pub use crate::plots::violin::{Kernel, ViolinPlot};
129 pub use crate::text::{parse_math, MathNotation};
130
131 #[cfg(feature = "raster")]
132 pub use crate::backend::SkiaCanvas;
133
134 pub use crate::backend::SvgCanvas;
135}
136
137pub use error::{Error, Result};
139
140#[cfg(test)]
141mod tests {
142 #[test]
143 fn test_placeholder() {
144 assert_eq!(2 + 2, 4);
146 }
147}