1pub mod bin;
2pub mod bin2d;
3pub mod bindot;
4pub mod binhex;
5pub mod boxplot;
6#[cfg(feature = "ggpubr")]
7pub mod compare_means;
8pub mod contour;
9pub mod contour_filled;
10#[cfg(feature = "ggpubr")]
11pub mod cor;
12pub mod count;
13pub mod density;
14pub mod density2d;
15pub mod dist;
16pub mod ecdf;
17pub mod ellipse;
18pub mod function;
19pub mod identity;
20pub mod loess;
21pub mod marching_squares;
22pub mod qq;
23#[cfg(feature = "regression")]
24pub mod quantile;
25pub mod smooth;
26pub mod sum;
27pub mod summary;
28pub mod summary2d;
29pub mod summary_bin;
30pub mod ydensity;
31
32use crate::aes::{Aes, Aesthetic};
33use crate::data::DataFrame;
34use crate::scale::ScaleSet;
35
36pub trait Stat: Send + Sync {
38 fn compute_group(&self, data: &DataFrame, scales: &ScaleSet) -> DataFrame;
40
41 fn required_aes(&self) -> Vec<Aesthetic>;
43
44 fn default_aes(&self) -> Aes {
46 Aes::default()
47 }
48
49 fn panelwise(&self) -> bool {
54 false
55 }
56
57 fn name(&self) -> &str;
59}