brief description: scatterplot
result:
sample code:
learned new techniquescategories = np.unique(midwest['category'])
np.unique outputs the number of unique labels
colors = [plt.cm.tab10(i/float(len(categories)-1)) for i in range(len(categories))]
plt.cm.tab10, cm is colourmap, tab10 is the colormap in matplotlib
plt.cm.tab10, cm is colourmap, tab10 is the colormap in matplotlib
for loop >>> data=midwest.loc[midwest.category==one]
the ‘for loop’ iterates items within each category label and plot them in one colour
the ‘for loop’ iterates items within each category label and plot them in one colour

No comments:
Post a Comment