MCPcopy Index your code
hub / github.com/cpmech/plotpy / legend

Method legend

src/plot.rs:301–305  ·  view source on GitHub ↗

Adds legend to the current axes using default Legend settings For more control (fontsize, columns, outside placement), create a [`Legend`] yourself and add it via [`add`](Self::add).

(&mut self)

Source from the content-addressed store, hash-verified

299 /// For more control (fontsize, columns, outside placement), create a [`Legend`] yourself
300 /// and add it via [`add`](Self::add).
301 pub fn legend(&mut self) -> &mut Self {
302 let mut legend = Legend::new();
303 legend.draw();
304 self.add(&legend)
305 }
306
307 /// Adds grid and labels
308 pub fn grid_and_labels(&mut self, xlabel: &str, ylabel: &str) -> &mut Self {

Callers 7

grid_labels_legendMethod · 0.80
grid_functions_workFunction · 0.80
test_barplot_2Function · 0.80
test_dark_mode_defaultFunction · 0.80
test_dark_mode_mochaFunction · 0.80
test_dark_mode_nordicFunction · 0.80

Calls 2

drawMethod · 0.45
addMethod · 0.45

Tested by 6

grid_functions_workFunction · 0.64
test_barplot_2Function · 0.64
test_dark_mode_defaultFunction · 0.64
test_dark_mode_mochaFunction · 0.64
test_dark_mode_nordicFunction · 0.64