Skip to content

Commit bd4baca

Browse files
committed
more plot updates
1 parent 1444052 commit bd4baca

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lectures/inequality.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,13 @@ f_vals, l_vals = lorenz_curve(sample)
203203
ax.plot(f_vals, l_vals, label=f'lognormal sample', lw=2)
204204
ax.plot(f_vals, f_vals, label='equality', lw=2)
205205
206-
ax.legend()
207-
208206
ax.vlines([0.8], [0.0], [0.43], alpha=0.5, colors='k', ls='--')
209207
ax.hlines([0.43], [0], [0.8], alpha=0.5, colors='k', ls='--')
210-
211208
ax.set_xlim((0, 1))
212209
ax.set_xlabel("Cumulative share of households (%)")
213210
ax.set_ylim((0, 1))
214211
ax.set_ylabel("Cumulative share of income (%)")
215-
212+
ax.legend()
216213
plt.show()
217214
```
218215

@@ -653,6 +650,7 @@ ax.plot(years, df_topshares["topshare_t_income"],
653650
ax.set_xlabel("year")
654651
ax.set_ylabel("top $10\%$ share")
655652
ax.legend()
653+
plt.show()
656654
```
657655
658656
## Exercises
@@ -823,6 +821,7 @@ ax.plot(years, top_shares_nw, marker='o', label="net wealth-lorenz")
823821
ax.set_xlabel("year")
824822
ax.set_ylabel("top $10\%$ share")
825823
ax.legend()
824+
plt.show()
826825
```
827826
828827
```{solution-end}

0 commit comments

Comments
 (0)