File tree Expand file tree Collapse file tree 1 file changed +21
-13
lines changed
Expand file tree Collapse file tree 1 file changed +21
-13
lines changed Original file line number Diff line number Diff line change 66``import petab.visualize``.
77
88"""
9+ import importlib .util
910
10- from .plot_data_and_simulation import (
11- plot_without_vis_spec ,
12- plot_with_vis_spec ,
13- plot_problem ,
14- )
11+ mpl_spec = importlib .util .find_spec ("matplotlib" )
1512
16- from .plot_residuals import plot_goodness_of_fit , plot_residuals_vs_simulation
17- from .plotter import MPLPlotter
1813from .plotting import DataProvider , Figure
1914
2015__all__ = [
21- "plot_without_vis_spec" ,
22- "plot_with_vis_spec" ,
23- "plot_problem" ,
24- "plot_goodness_of_fit" ,
25- "plot_residuals_vs_simulation" ,
26- "MPLPlotter" ,
2716 "DataProvider" ,
2817 "Figure"
2918]
19+
20+ if mpl_spec is not None :
21+ from .plot_data_and_simulation import (
22+ plot_without_vis_spec ,
23+ plot_with_vis_spec ,
24+ plot_problem ,
25+ )
26+
27+ from .plot_residuals import plot_goodness_of_fit , plot_residuals_vs_simulation
28+ from .plotter import MPLPlotter
29+
30+ __all__ .extend ([
31+ "plot_without_vis_spec" ,
32+ "plot_with_vis_spec" ,
33+ "plot_problem" ,
34+ "plot_goodness_of_fit" ,
35+ "plot_residuals_vs_simulation" ,
36+ "MPLPlotter" ,
37+ ])
You can’t perform that action at this time.
0 commit comments