Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milano #7

Open
wants to merge 19 commits into
base: milano
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# lectures
Presentations for our courses
changed buy Luigi
48 changes: 48 additions & 0 deletions data_exercise.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@





######################### firts snip
colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral','blue']
shown=st[:len(colors)-1]
others=st[len(colors)-1:]
other_sum=others['core_hours'].sum()
values=shown['core_hours'].values.tolist()+[other_sum]
labels=shown.index.tolist()+['others']
print labels
print values

######################### display plain snip
plt.rcParams['figure.figsize'] = 5, 5

plt.pie(values, labels=labels, colors=colors,
autopct='%1.1f%%', shadow=True, startangle=90)
# Set aspect ratio to be equal so that pie is drawn as a circle.
plt.axis('equal')

plt.show()


######################### display explode snip


plt.rcParams['figure.figsize'] = 5, 5

explode = [0] * (len(colors)-1) +[0.1]
plt.pie(values, explode=explode, labels=labels, colors=colors,
autopct='%1.1f%%', shadow=True, startangle=90)
# Set aspect ratio to be equal so that pie is drawn as a circle.
plt.axis('equal')

plt.show()










231 changes: 231 additions & 0 deletions pydata/MatPlotLib_hystogram.ipynb

Large diffs are not rendered by default.

Binary file added pydata/images/pie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading