Apply default positioning for plot titles (x=0.5, y=0.95 - centered above)
(mut self)
| 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 { |
no outgoing calls