[workspace]
members = ["crates/*"]
resolver = "2"

[package]
name = "plotkit"
version = "1.0.0"
edition = "2021"
rust-version = "1.75"
description = "A matplotlib-shaped, publication-quality plotting library for Rust"
license = "MIT OR Apache-2.0"
repository = "https://github.com/anonymousAAK/plotrs"
homepage = "https://plotkit.rs"
documentation = "https://docs.rs/plotkit"
readme = "README.md"
keywords = ["plotting", "chart", "visualization", "svg", "matplotlib"]
categories = ["visualization", "science", "multimedia::images"]

[dependencies]
plotkit-core = { path = "crates/plotkit-core", version = "1.0.0" }
plotkit-render-skia = { path = "crates/plotkit-render-skia", version = "1.0.0" }
plotkit-render-svg = { path = "crates/plotkit-render-svg", version = "1.0.0", optional = true }
plotkit-render-pdf = { path = "crates/plotkit-render-pdf", version = "1.0.0", optional = true }
plotkit-ndarray = { path = "crates/plotkit-ndarray", version = "1.0.0", optional = true }
plotkit-polars = { path = "crates/plotkit-polars", version = "1.0.0", optional = true }
base64 = { version = "0.22", optional = true }

[features]
default = ["png", "svg"]
png = []
svg = ["dep:plotkit-render-svg"]
pdf = ["dep:plotkit-render-pdf"]
jupyter = ["png", "dep:base64"]
ndarray = ["dep:plotkit-ndarray"]
polars = ["dep:plotkit-polars"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[[example]]
name = "01_line"
path = "examples/01_line.rs"

[[example]]
name = "02_scatter"
path = "examples/02_scatter.rs"

[[example]]
name = "03_bar"
path = "examples/03_bar.rs"

[[example]]
name = "04_histogram"
path = "examples/04_histogram.rs"

[[example]]
name = "05_fill_between"
path = "examples/05_fill_between.rs"

[[example]]
name = "06_errorbar"
path = "examples/06_errorbar.rs"

[[example]]
name = "07_boxplot"
path = "examples/07_boxplot.rs"

[[example]]
name = "08_step"
path = "examples/08_step.rs"

[[example]]
name = "09_stem"
path = "examples/09_stem.rs"

[[example]]
name = "10_heatmap"
path = "examples/10_heatmap.rs"

[[example]]
name = "11_colormap_scatter"
path = "examples/11_colormap_scatter.rs"

[[example]]
name = "12_polars"
path = "examples/12_polars.rs"
required-features = ["polars"]

[[example]]
name = "47_df_plot"
path = "examples/47_df_plot.rs"
required-features = ["polars"]

[[example]]
name = "13_ndarray"
path = "examples/13_ndarray.rs"
required-features = ["ndarray"]

[[example]]
name = "14_pie"
path = "examples/14_pie.rs"

[[example]]
name = "14_annotations"
path = "examples/14_annotations.rs"

[[example]]
name = "15_logscale"
path = "examples/15_logscale.rs"

[[example]]
name = "16_axis_control"
path = "examples/16_axis_control.rs"

[[example]]
name = "17_violin"
path = "examples/17_violin.rs"

[[example]]
name = "17_colorbar"
path = "examples/17_colorbar.rs"

[[example]]
name = "17_twinx"
path = "examples/17_twinx.rs"

[[example]]
name = "17_contour"
path = "examples/17_contour.rs"

[[example]]
name = "17_pdf"
path = "examples/17_pdf.rs"
required-features = ["pdf"]

[[example]]
name = "18_stacked_bar"
path = "examples/18_stacked_bar.rs"

[[example]]
name = "19_grouped_bar"
path = "examples/19_grouped_bar.rs"

[[example]]
name = "20_polar"
path = "examples/20_polar.rs"

[[example]]
name = "20_hexbin"
path = "examples/20_hexbin.rs"

[[example]]
name = "20_themes"
path = "examples/20_themes.rs"

[[example]]
name = "20_waterfall"
path = "examples/20_waterfall.rs"

[[example]]
name = "33_symlog"
path = "examples/33_symlog.rs"

[[example]]
name = "34_loglog"
path = "examples/34_loglog.rs"

[[example]]
name = "35_barh"
path = "examples/35_barh.rs"

[[example]]
name = "36_density_hist"
path = "examples/36_density_hist.rs"

[[example]]
name = "37_stacked_area"
path = "examples/37_stacked_area.rs"

[[example]]
name = "38_scatter_colorbar"
path = "examples/38_scatter_colorbar.rs"

[dev-dependencies]
insta = { version = "1", features = ["glob"] }
criterion = { version = "0.5", features = ["html_reports"] }
plotkit-render-skia = { path = "crates/plotkit-render-skia", version = "1.0.0" }
plotkit-core = { path = "crates/plotkit-core", version = "1.0.0" }

[[bench]]
name = "render_benchmarks"
harness = false
