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

Method save

src/plot.rs:233–238  ·  view source on GitHub ↗

Calls Python and saves the python script and figure The figure format is determined by the file extension (`.svg`, `.png`, `.pdf`, etc.). # Input `figure_path` -- may be a String, &str, or Path # Notes 1. You may want to call [Plot::set_show_errors()] to enable the display of Python errors (if any) 2. The intermediate Python script is saved alongside the figure with a `.py` extension

(&self, figure_path: &S)

Source from the content-addressed store, hash-verified

231 /// display of Python errors (if any)
232 /// 2. The intermediate Python script is saved alongside the figure with a `.py` extension
233 pub fn save<S>(&self, figure_path: &S) -> Result<(), StrError>
234 where
235 S: AsRef<OsStr> + ?Sized,
236 {
237 self.run(figure_path, false)
238 }
239
240 /// Calls Python, saves the python script and figure, and shows the plot window
241 ///

Callers 15

save_worksFunction · 0.80
show_in_jupyter_worksFunction · 0.80
save_str_worksFunction · 0.80
test_surface_geometryFunction · 0.80
test_surface_cylinderFunction · 0.80
test_inset_axes_1Function · 0.80
test_inset_axes_2Function · 0.80
test_inset_axes_3Function · 0.80
test_inset_axes_4Function · 0.80
test_inset_axes_5Function · 0.80
test_inset_axes_6Function · 0.80

Calls 1

runMethod · 0.80

Tested by 15

save_worksFunction · 0.64
show_in_jupyter_worksFunction · 0.64
save_str_worksFunction · 0.64
test_surface_geometryFunction · 0.64
test_surface_cylinderFunction · 0.64
test_inset_axes_1Function · 0.64
test_inset_axes_2Function · 0.64
test_inset_axes_3Function · 0.64
test_inset_axes_4Function · 0.64
test_inset_axes_5Function · 0.64
test_inset_axes_6Function · 0.64