import numpy as np import holoviews as hv hv.extension('matplotlib') x = np.arange(-3.0,3.0,0.1) y = np.arange(-3.0,3.0,0.1) X,Y = np.meshgrid(x, y) def g(x,y,c): return 2*((x-y)**2/(x**2+y**2)) + np.exp(-(np.sqrt(x**2+y**2)-c)**2) %%output filename="pulse" fig="png" holomap="gif" hv.Image(g(X,Y,2)) hv.RGB.load_image('pulse.png') %%opts Image [xaxis='bare', yaxis='bare' show_title=False, colorbar=True] (cmap='fire') %%output holomap='gif' fps=5 hv.HoloMap([(t, hv.Image(g(X,Y, 4 * np.sin(np.pi*t)))) for t in np.linspace(0,1,21)]) %%opts Image [xaxis='bare', yaxis='bare' show_title=False, colorbar=True] (cmap='fire') %%output holomap='mp4' hv.HoloMap([(t, hv.Image(g(X,Y, 4 * np.sin(np.pi*t)))) for t in np.linspace(0,1,21)])