XDV1.0.0(Pre-alpha)
from matplotlib import pyplot
print('Welcome to XDV1.0.0(Pre-alpha)bilibili:XRJ-Python')
pyplot.rcParams['font.sans-serif'] = ['Arial UnicodeMS', 'simhei']
cmd = ''
data = ''
while True:
? ?cmd = input()
? ?if cmd == 'pie':
? ? ? ?print('Input Pie Chart Data:')
? ? ? ?data = input().split()
? ? ? ?data = [int(xh) for xh in data]
? ? ? ?print('Input Image Label:')
? ? ? ?lab = input().split()
? ? ? ?print('Enter image radius:')
? ? ? ?rad = int(input())
? ? ? ?print('Enter image name:')
? ? ? ?name = input()
? ? ? ?pyplot.pie(data,labels=lab,autopct='%.2f%%',radius=rad)
? ? ? ?print('Production in progress, please wait.')
? ? ? ?pyplot.savefig(name+'.png')
? ? ? ?print('Successfully saved!')
? ? ? ?pyplot.show()
? ?elif cmd == 'plot':
? ? ? ?print('Input X data:')