jakevdp / PythonDataScienceHandbook

Python Data Science Handbook: full text in Jupyter Notebooks
http://jakevdp.github.io/PythonDataScienceHandbook
MIT License
43.02k stars 17.88k forks source link

02.07 Fancy Indexing: matplotlib.pyplot Output Cell 17 #122

Open mbarbaro opened 6 years ago

mbarbaro commented 6 years ago

In cell [17] the code plt.scatter(selection[:, 0], selection[:, 1], facecolor='none', s=200); produces no output on the figure. I believe this is because the edgecolor defaults to the facecolor value, as mentioned in the matplotlib.pyplot.scatter documentation. The previous line of cell [17] produces the points of X with alpha=0.3 but no circle outlines are drawn.

The following code produces an output like that seen in the source notebook: plt.scatter(selection[:, 0], selection[:, 1], facecolor='none', edgecolor= 'k', s=200);

Perhaps this is a matplotlib version issue. I am using version 2.1.1

bingyao commented 5 years ago

the edgecolors='black', parameter can fix this issue.