jupyter-slides-template¶
- This is a web version of a Jupyter notebook RISE presentation
- It is automatically generated from this jupyter notebook
- Press
SpaceorRightto move to the next page - Press
Shift+SpaceorLeftto move to the previous page - Press
Escapeto zoom out - Make your own at github.com/ssciwr/jupyter-slides-template
Display a cell with its output¶
In [1]:
import sme
model = sme.open_example_model()
print(model)
<sme.Model>
- name: 'Very Simple Model'
- compartments:
- Outside
- Cell
- Nucleus
- membranes:
- Outside <-> Cell
- Cell <-> Nucleus
Output can be plots or images¶
In [2]:
import matplotlib.pyplot as plt
plt.title(model.name)
plt.imshow(model.compartment_image[0, :])
plt.show()
Or even videos¶
In [3]:
import sme_contrib.plot as smeplot
from IPython.display import HTML
results = model.simulate(100, 10)
anim = smeplot.concentration_heatmap_animation(results, ["B_cell"])
HTML(anim.to_html5_video())
Out[3]: