Fix figure 2-13 x-axis values and legend not showing

main
Aurélien Geron 2017-06-06 22:28:39 +02:00
parent e9a8883531
commit 711a577f1a
1 changed files with 3 additions and 1 deletions

View File

@ -551,7 +551,9 @@
"housing.plot(kind=\"scatter\", x=\"longitude\", y=\"latitude\", alpha=0.4,\n",
" s=housing[\"population\"]/100, label=\"population\", figsize=(10,7),\n",
" c=\"median_house_value\", cmap=plt.get_cmap(\"jet\"), colorbar=True,\n",
")\n",
" sharex=False) # sharex=False fixes a bug (temporary solution)\n",
" # See: https://github.com/pandas-dev/pandas/issues/10611\n",
" # Thanks to Wilmer Arellano for pointing it out.\n",
"plt.legend()\n",
"save_fig(\"housing_prices_scatterplot\")"
]