forked from 09superm/python_project_2019
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.py
More file actions
17 lines (14 loc) · 591 Bytes
/
3.py
File metadata and controls
17 lines (14 loc) · 591 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import matplotlib.pyplot as plt
from matplotlib import font_manager, rc
from matplotlib import style
# 그래프 만들기
font_name = font_manager.FontProperties(fname="/System/Library/Fonts/AppleSDGothicNeo.ttc").get_name()
rc('font', family=font_name)
style.use('ggplot')
colors = ['gold', 'yellowgreen', 'lightcoral', 'lightskyblue', 'red']
labels = your_input
ratio = gmvpwgt
explode = (0.1, 0.1, 0.1, 0.1, 0.1)
plt.title("Global Minimum Volatility Portfolio\n")
plt.pie(ratio, explode=explode, labels=labels, colors=colors, autopct='%1.1f%%', shadow=True, startangle=90)
plt.show()