Expand description
What a built plot draws, as numbers: per layer (and facet panel) and per series, how many marks, the x range, the y minimum / maximum and where, the first and last y, and a band’s extent. A caller that writes about a chart (a title, an answer) can quote these instead of guessing them.
use ggplot_rs::prelude::*;
let df = vec![
("x".to_string(), vec![Value::Str("a".into()), Value::Str("b".into())]),
("y".to_string(), vec![Value::Float(3.0), Value::Float(5.0)]),
];
let built = GGPlot::new(df).aes(Aes::new().x("x").y("y")).geom_col().build();
assert_eq!(built.summary_text(), "col: 2 marks, x a … b; y first 3, last 5, min 3 at a, max 5 at b");Structs§
- Layer
Summary - One layer of one panel.
- Plot
Summary - The summaries of every layer, panel by panel.
- Series
Summary - One series of a layer (all its rows when the layer has no series column).
Constants§
- MAX_
SERIES - At most this many series per layer are listed; the rest are counted.