MCPcopy Create free account
hub / github.com/alceal/plotlars / with_plot_title_defaults

Method with_plot_title_defaults

crates/plotlars-core/src/components/text.rs:149–158  ·  view source on GitHub ↗

Apply default positioning for plot titles (x=0.5, y=0.95 - centered above)

(mut self)

Source from the content-addressed store, hash-verified

147
148 /// Apply default positioning for plot titles (x=0.5, y=0.95 - centered above)
149 pub fn with_plot_title_defaults(mut self) -> Self {
150 const EPSILON: f64 = 1e-6;
151 let y_is_default = (self.y - 0.9).abs() < EPSILON;
152
153 if y_is_default {
154 self.y = 0.95;
155 }
156
157 self
158 }
159
160 /// Apply default positioning for subplot titles (x=0.5, y=1.1 - centered above, higher than overall)
161 pub fn with_subplot_title_defaults(mut self) -> Self {

Callers 3

create_regular_layoutFunction · 0.80
create_irregular_layoutFunction · 0.80

Calls

no outgoing calls

Tested by 1