commit
b575063c7e
|
@ -533,7 +533,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"prices = housing[\"median_house_value\"]\n",
|
"prices = housing[\"median_house_value\"]\n",
|
||||||
"tick_values = np.linspace(prices.min(), prices.max(), 11)\n",
|
"tick_values = np.linspace(prices.min(), prices.max(), 11)\n",
|
||||||
"cbar = plt.colorbar()\n",
|
"cbar = plt.colorbar(ticks=tick_values/prices.max())\n",
|
||||||
"cbar.ax.set_yticklabels([\"$%dk\"%(round(v/1000)) for v in tick_values], fontsize=14)\n",
|
"cbar.ax.set_yticklabels([\"$%dk\"%(round(v/1000)) for v in tick_values], fontsize=14)\n",
|
||||||
"cbar.set_label('Median House Value', fontsize=16)\n",
|
"cbar.set_label('Median House Value', fontsize=16)\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
Loading…
Reference in New Issue