Commit 9630ca8b authored by René Fritze's avatar René Fritze Committed by René Fritze

[vis] refactor jupyter display with MPL

parent 79ef3c3f
...@@ -43,6 +43,8 @@ class MatplotlibAxesBase: ...@@ -43,6 +43,8 @@ class MatplotlibAxesBase:
blit=True, event_source=sync_timer) blit=True, event_source=sync_timer)
# generating the HTML instance outside this class causes the plot display to fail # generating the HTML instance outside this class causes the plot display to fail
self.html = HTML(self.anim.to_jshtml()) self.html = HTML(self.anim.to_jshtml())
else:
self.set(self.U[0])
@abstractmethod @abstractmethod
def _plot_init(self): def _plot_init(self):
...@@ -101,11 +103,13 @@ class MatplotlibPatchAxes(MatplotlibAxesBase): ...@@ -101,11 +103,13 @@ class MatplotlibPatchAxes(MatplotlibAxesBase):
class Matplotlib1DAxes(MatplotlibAxesBase): class Matplotlib1DAxes(MatplotlibAxesBase):
def __init__(self, U, ax, figure, grid, count=1, vmin=None, vmax=None, codim=1, sync_timer=None): def __init__(self, U, ax, figure, grid, count=1, vmin=None, vmax=None, codim=1, separate_plots=False,
sync_timer=None):
assert isinstance(grid, OnedGrid) assert isinstance(grid, OnedGrid)
assert codim in (0, 1) assert codim in (0, 1)
self.count = count self.count = count
self.separate_plots = separate_plots
super().__init__(U=U, ax=ax, figure=figure, grid=grid, vmin=vmin, vmax=vmax, codim=codim, super().__init__(U=U, ax=ax, figure=figure, grid=grid, vmin=vmin, vmax=vmax, codim=codim,
sync_timer=sync_timer) sync_timer=sync_timer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment