Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/docs/books/simple/notebooks/computations.ipynb
3589 views
Kernel: Python 3 (ipykernel)

Computations

This is a simple markdown cell that has various contents in it. What is up!

<b>Hello World - this is HTML!</b>
#| label: fig-visualization #| fig-cap: A display of a line and region moving up and to the right. import matplotlib.pyplot as plt import numpy as np # make data np.random.seed(1) x = np.linspace(0, 8, 16) y1 = 3 + 4*x/8 + np.random.uniform(0.0, 0.5, len(x)) y2 = 1 + 2*x/8 + np.random.uniform(0.0, 0.5, len(x)) # plot fig, ax = plt.subplots() ax.fill_between(x, y1, y2, alpha=.5, linewidth=0) ax.plot(x, (y1 + y2)/2, linewidth=2) ax.set(xlim=(0, 8), xticks=np.arange(1, 8), ylim=(0, 8), yticks=np.arange(1, 8)) # Store the plot in the notebook as different MIME types from IPython.display import Image, SVG, display from io import BytesIO # SVG alternative buffer = BytesIO() plt.savefig(buffer, format='svg')
Image in a Jupyter notebook