MCPcopy Create free account
hub / github.com/cpmech/plotpy / grid_labels_legend

Method grid_labels_legend

src/plot.rs:322–333  ·  view source on GitHub ↗

Adds grid, labels, and legend

(&mut self, xlabel: &str, ylabel: &str)

Source from the content-addressed store, hash-verified

320
321 /// Adds grid, labels, and legend
322 pub fn grid_labels_legend(&mut self, xlabel: &str, ylabel: &str) -> &mut Self {
323 write!(
324 &mut self.buffer,
325 "plt.gca().set_axisbelow(True)\n\
326 plt.grid(linestyle='--',color='grey',zorder=-1000)\n\
327 plt.gca().set_xlabel(r'{}')\n\
328 plt.gca().set_ylabel(r'{}')\n",
329 xlabel, ylabel
330 )
331 .unwrap();
332 self.legend()
333 }
334
335 /// Enables the display of python errors (if any)
336 pub fn set_show_errors(&mut self, option: bool) -> &mut Self {

Callers 1

grid_functions_workFunction · 0.80

Calls 1

legendMethod · 0.80

Tested by 1

grid_functions_workFunction · 0.64