-
DescriptionI am using revealjs output. Very impressed so far. I like the
|
Beta Was this translation helpful? Give feedback.
Answered by
mcanouil
Sep 24, 2023
Replies: 1 comment
-
Using CSS you can achieve custom column-width ---
title: "ECON526: Quantitative Economics with Data Science Applications"
subtitle: "Probability, Uncertainty, and Stochastic Processes"
author: "Jesse Perla"
format: revealjs
include-in-header:
- text: |
<style>
.reveal .custom3070 > div.column:first-child {
width: 30%;
}
.reveal .custom3070 div.column:not(:first-child) {
width: 70%;
}
</style>
---
## Binomial
```{python}
#| classes: custom3070
#| echo: true
#| output-location: column
#| code-line-numbers: "4-6"
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats
u = scipy.stats.binom(10, 0.5)
grid = np.arange(6)
u_pmf = u.pmf(grid)
fig, ax = plt.subplots()
ax.plot(grid, u_pmf,
linestyle='', marker='o',
alpha=0.8, ms=4)
ax.vlines(grid, 0, u_pmf,
lw=0.2)
ax.set_xticks(grid)
plt.show()
```
## Binomial (normal)
```{python}
#| echo: true
#| output-location: column
#| code-line-numbers: "4-6"
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats
u = scipy.stats.binom(10, 0.5)
grid = np.arange(6)
u_pmf = u.pmf(grid)
fig, ax = plt.subplots()
ax.plot(grid, u_pmf,
linestyle='', marker='o',
alpha=0.8, ms=4)
ax.vlines(grid, 0, u_pmf,
lw=0.2)
ax.set_xticks(grid)
plt.show()
```
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jlperla
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using CSS you can achieve custom column-width