runmat_runtime/
plotting_hooks.rs1pub fn reset_recent_figures() {
6 #[cfg(feature = "plot-core")]
7 {
8 crate::builtins::plotting::reset_recent_figures();
9 }
10}
11
12pub fn take_recent_figures() -> Vec<u32> {
14 #[cfg(feature = "plot-core")]
15 {
16 crate::builtins::plotting::take_recent_figures()
17 .into_iter()
18 .map(|handle| handle.as_u32())
19 .collect()
20 }
21 #[cfg(not(feature = "plot-core"))]
22 {
23 Vec::new()
24 }
25}
26
27pub fn record_recent_figures(handles: impl IntoIterator<Item = u32>) {
29 #[cfg(feature = "plot-core")]
30 {
31 for handle in handles {
32 crate::builtins::plotting::record_recent_figure(handle.into());
33 }
34 }
35 #[cfg(not(feature = "plot-core"))]
36 {
37 let _ = handles;
38 }
39}