#在线编程从哪里进去啊,对于python支持例如numpy这样的包吗 ,还是得自己import啊#如题,如题,找不到入口诶,请问这个在线编程支持诸如python的统计画图吗,比如这段代码import sysimport numpy as npimport matplotlib.pyplot as pltdef get_data(): # example data mu = 100 # mean of distribution sigma = 15 # standard deviation of distribution x = mu + sigma * np.random.randn(10000) return x#you can write your code here#def draw(IMG_PATH):#get input datadef draw(): x = get_data() print 'data is : '+str(x) # the histogram of the data plt.hist(x, bins=50, color='g', alpha=0.5) #show image plt.show() print 'i excute it' # plt.savefig(IMG_PATH)#the code should not be changed"""if __name__ == '__main__': if len(sys.argv)==1: print 'error' else: #the path of image to show IMG_PATH = sys.argv[1]+'fig.jpg' draw(IMG_PATH)"""draw()
添加回答
举报
0/150
提交
取消