PythonDataScienceHandbook icon indicating copy to clipboard operation
PythonDataScienceHandbook copied to clipboard

02.07 Fancy Indexing: matplotlib.pyplot Output Cell 17

Open mbarbaro opened this issue 8 years ago • 1 comments

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

mbarbaro avatar Jan 23 '18 18:01 mbarbaro

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

bingyao avatar Jun 26 '19 07:06 bingyao