运行 ❯
获取您的
Python 服务器
×
更改方向
更改主题,深色/浅色
转到 Spaces
#Three lines to make our compiler able to draw: import sys import matplotlib matplotlib.use('Agg') import pandas as pd import matplotlib.pyplot as plt negative_corr = {'Hours_Work_Before_Training': [10,9,8,7,6,5,4,3,2,1], 'Calorie_Burnage': [220,240,260,280,300,320,340,360,380,400]} negative_corr = pd.DataFrame(data=negative_corr) negative_corr.plot(x ='Hours_Work_Before_Training', y='Calorie_Burnage', kind='scatter') plt.show() #Two lines to make our compiler able to draw: plt.savefig(sys.stdout.buffer) sys.stdout.flush()