Quarto + reveal.js

Sam Foreman

2023-06-05

PASC 23

Overview

Code
import numpy as np
x = np.random.rand()
print(x)
0.12161233612292432

Columns

Left column

Right column

Python

For a demonstration of a line plot on a polar axis, see Figure 1

import numpy as np
import matplotlib.pyplot as plt

plt.rcParams.update({
    'axes.facecolor': 'none',
    'figure.facecolor': 'none',
    'savefig.facecolor': 'none',
    'savefig.format': 'svg',
    'axes.edgecolor': 'none',
    'axes.grid': True,
    'axes.labelcolor': '#666',
    'axes.titlecolor': '#666',
    'grid.color': '#666',
    'text.color': '#666',
    'grid.linestyle': '--',
    'grid.linewidth': 0.5,
    'grid.alpha': 0.4,
    'xtick.color': 'none',
    'ytick.color': 'none',
    'xtick.labelcolor': '#666',
    'legend.edgecolor': 'none',
    'ytick.labelcolor': '#666',
    'savefig.transparent': True,
})

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fix, ax = plt.subplots(
    subplot_kw = {'projection': 'polar'}
)
assert isinstance(ax, plt.PolarAxes)
ax.plot(theta, r)
ax.set_rticks([0.5, 1., 1.5, 2.])
ax.grid(True)
plt.show()

Python

Figure 1: A line plot on a polar axis

Plotly

Figure 2: A plot made using plotly express

Jupyter Widgets

Figures with Subcaptions

(a) First

(b) Second

Figure 3: Charts

Mermaid Diagrams

flowchart TB
  A --> C
  A --> D
  B --> C
  B --> D

Block Layout

List One

  • Item A
  • Item B
  • Item C

List Two

  • Item X
  • Item Y
  • Item Z

Placing Colorbars

Colorbars indicate the quantitative extent of image data. Placing in a figure is non-trivial because room needs to be made for them. The simplest case is just attaching a colorbar to each axes:1.

Model Parallel Training: Example

\[y = w_0 * x_0 + w_1 * x_1 + w_2 * x_2\]

  1. Compute \(y_{0} = w_{0} * x_{0}\) and send to \(\longrightarrow\) GPU1
  2. Compute \(y_{1} = y_{0} + w_{1} * x_{1}\) and send to \(\longrightarrow\) GPU2
  3. Compute \(y = y_{1} * w_{2} * x_{2}\)
flowchart LR
  subgraph X0["GPU0"]
    direction LR
    a["w0"]
  end
  subgraph X1["GPU1"]
    direction LR
    b["w1"]
  end
  subgraph X2["GPU2"]
    direction LR
    c["w2"]
  end
  X1 & X0 <--> X2
  X0 <--> X1
  x["x0, x1, x2"] --> X0

Extras

Note

Note that there are five types of callouts, including: note, tip, warning, caution, and important.

  • Testing lists
  • Testing
    • Testing
    • Testing again
      • triple Checkboxes
    • Nested lists
      • Checkboxes ??

Thank you!