MCPcopy Create free account
hub / github.com/catboost/catboost / try_plot_offline

Function try_plot_offline

catboost/python-package/catboost/plot_helpers.py:9–21  ·  view source on GitHub ↗
(figs)

Source from the content-addressed store, hash-verified

7
8
9def try_plot_offline(figs):
10 try:
11 from plotly.offline import iplot
12 from plotly.offline import init_notebook_mode
13 init_notebook_mode(connected=True)
14 except ImportError as e:
15 warn_msg = "To draw plots you should install plotly."
16 warnings.warn(warn_msg)
17 raise ImportError(str(e))
18 if not isinstance(figs, list):
19 figs = [figs]
20 for fig in figs:
21 iplot(fig)
22
23
24def save_plot_file(plot_file, plot_name, figs):

Callers 3

plot_predictionsMethod · 0.85

Calls 2

isinstanceFunction · 0.85
strClass · 0.50

Tested by

no test coverage detected