-
-
Save amankharwal/d5da261ccdc52b95d7a9e0e510d2da44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib.gridspec import GridSpec | |
targetCounts = resumeDataSet['Category'].value_counts() | |
targetLabels = resumeDataSet['Category'].unique() | |
# Make square figures and axes | |
plt.figure(1, figsize=(25,25)) | |
the_grid = GridSpec(2, 2) | |
cmap = plt.get_cmap('coolwarm') | |
colors = [cmap(i) for i in np.linspace(0, 1, 3)] | |
plt.subplot(the_grid[0, 1], aspect=1, title='CATEGORY DISTRIBUTION') | |
source_pie = plt.pie(targetCounts, labels=targetLabels, autopct='%1.1f%%', shadow=True, colors=colors) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment