MCPcopy
hub / github.com/tum-pbs/PhiFlow / _test_plot

Method _test_plot

tests/commit/vis/test__plots.py:15–23  ·  view source on GitHub ↗
(self, *plottable, show_=True, **kwargs)

Source from the content-addressed store, hash-verified

13class TestPlots(TestCase):
14
15 def _test_plot(self, *plottable, show_=True, **kwargs):
16 fig = plot(*plottable, lib='matplotlib', **kwargs)
17 fig = fig.native() if isinstance(fig, Tensor) else fig
18 self.assertIsInstance(fig, plt.Figure)
19 fig = plot(*plottable, lib='plotly', **kwargs)
20 self.assertIsInstance(fig, plotly.graph_objs.Figure)
21 if show_:
22 show(lib='matplotlib')
23 show(lib='plotly')
24
25 def test_bar_chart(self):
26 dim = instance(planets='Sun,Earth,Mars')

Callers 15

test_bar_chartMethod · 0.95
test_plot_1dMethod · 0.95
test_plot_multi_1dMethod · 0.95
test_plot_multi_gridMethod · 0.95

Calls 2

plotFunction · 0.90
showFunction · 0.90

Tested by

no test coverage detected