Skip to content

Commit b388345

Browse files
committed
update xy label using lower case
1 parent f707a11 commit b388345

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lectures/prob_dist.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,8 @@ We can histogram the income distribution we just constructed as follows
742742
x = df['income']
743743
fig, ax = plt.subplots()
744744
ax.hist(x, bins=5, density=True, histtype='bar')
745-
ax.set_xlabel('Income')
746-
ax.set_ylabel('Density')
745+
ax.set_xlabel('income')
746+
ax.set_ylabel('density')
747747
plt.show()
748748
```
749749

@@ -785,7 +785,7 @@ x_amazon = np.asarray(data)
785785
fig, ax = plt.subplots()
786786
ax.hist(x_amazon, bins=20)
787787
ax.set_xlabel('monthly return (percent change)')
788-
ax.set_ylabel('Density')
788+
ax.set_ylabel('density')
789789
plt.show()
790790
```
791791

@@ -800,7 +800,7 @@ KDE will generate a smooth curve that approximates the PDF.
800800
```{code-cell} ipython3
801801
fig, ax = plt.subplots()
802802
sns.kdeplot(x_amazon, ax=ax)
803-
ax.set_xlabel('Monthly Return (Percent Change)')
803+
ax.set_xlabel('monthly return (percent change)')
804804
ax.set_ylabel('KDE')
805805
plt.show()
806806
```
@@ -812,7 +812,7 @@ fig, ax = plt.subplots()
812812
sns.kdeplot(x_amazon, ax=ax, bw_adjust=0.1, alpha=0.5, label="bw=0.1")
813813
sns.kdeplot(x_amazon, ax=ax, bw_adjust=0.5, alpha=0.5, label="bw=0.5")
814814
sns.kdeplot(x_amazon, ax=ax, bw_adjust=1, alpha=0.5, label="bw=1")
815-
ax.set_xlabel('Monthly Return (Percent Change)')
815+
ax.set_xlabel('monthly return (percent change)')
816816
ax.set_ylabel('KDE')
817817
plt.legend()
818818
plt.show()
@@ -832,7 +832,7 @@ Yet another way to display an observed distribution is via a violin plot.
832832
```{code-cell} ipython3
833833
fig, ax = plt.subplots()
834834
ax.violinplot(x_amazon)
835-
ax.set_ylabel('Monthly Return (Percent Change)')
835+
ax.set_ylabel('monthly return (percent change)')
836836
ax.set_xlabel('KDE')
837837
plt.show()
838838
```
@@ -854,7 +854,7 @@ x_apple = np.asarray(data)
854854
```{code-cell} ipython3
855855
fig, ax = plt.subplots()
856856
ax.violinplot([x_amazon, x_apple])
857-
ax.set_ylabel('Monthly Return (Percent Change)')
857+
ax.set_ylabel('monthly return (percent change)')
858858
ax.set_xlabel('KDE')
859859
plt.show()
860860
```
@@ -889,8 +889,8 @@ x_grid = np.linspace(-50, 65, 200)
889889
fig, ax = plt.subplots()
890890
ax.plot(x_grid, u.pdf(x_grid))
891891
ax.hist(x_amazon, density=True, bins=40)
892-
ax.set_xlabel('Monthly Return (Percent Change)')
893-
ax.set_ylabel('Density')
892+
ax.set_xlabel('monthly return (percent change)')
893+
ax.set_ylabel('density')
894894
plt.show()
895895
```
896896

@@ -919,7 +919,7 @@ fig, ax = plt.subplots()
919919
ax.plot(x_grid, u.pdf(x_grid))
920920
ax.hist(x_draws, density=True, bins=40)
921921
ax.set_xlabel('x')
922-
ax.set_ylabel('Density')
922+
ax.set_ylabel('density')
923923
plt.show()
924924
```
925925

0 commit comments

Comments
 (0)