Adds grid, labels, and legend
(&mut self, xlabel: &str, ylabel: &str)
| 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 { |