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

Function write_plot_file

catboost/python-package/catboost/plot_helpers.py:32–50  ·  view source on GitHub ↗
(plot_file_stream)

Source from the content-addressed store, hash-verified

30 raise ImportError(str(e))
31
32 def write_plot_file(plot_file_stream):
33 plot_file_stream.write('\n'.join((
34 '<html>',
35 '<head>',
36 '<meta charset="utf-8" />',
37 '<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>',
38 '<title>{}</title>'.format(plot_name),
39 '</head>',
40 '<body>'
41 )))
42 for fig in figs:
43 graph_div = plotly_plot(
44 fig,
45 output_type='div',
46 show_link=False,
47 include_plotlyjs=False
48 )
49 plot_file_stream.write('\n{}\n'.format(graph_div))
50 plot_file_stream.write('</body>\n</html>')
51
52 if isinstance(plot_file, str):
53 with open(fspath(plot_file), 'w') as plot_file_stream:

Callers 1

save_plot_fileFunction · 0.85

Calls 3

writeMethod · 0.45
joinMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected