mod figure;
mod layout;
mod subplot;
pub use figure::*;
pub use layout::*;
pub use subplot::*;
pub use draw::{Color, FileFormat, FontName};
pub mod backend {
pub use draw::Canvas;
#[cfg(feature = "cairo")]
pub use draw_cairo::CairoCanvas;
}
#[non_exhaustive]
#[derive(thiserror::Error, Debug)]
pub enum PltError {
#[error("Input data is in an invalid state: `{0}`")]
InvalidData(String),
#[error("index `{index}` is out of range for figure with {nrows} rows and {ncols} columns")]
InvalidIndex { index: u32, nrows: u32, ncols: u32 },
#[error("row index `{row}` is out of range for layout with {nrows} rows")]
InvalidRow { row: usize, nrows: usize },
#[error("column index `{col}` is out of range for layout with {ncols} columns")]
InvalidColumn { col: usize, ncols: usize },
#[error("one or more ticks have invalid locations: `{0}`")]
BadTickPlacement(String),
#[error("{0}")]
BadTickLabels(String),
#[error("{0:?} is not a valid fractional area")]
InvalidSubplotArea(layout::FractionalArea),
#[error(transparent)]
DrawError(#[from] draw::DrawError)
}