2021
07-08
07-08
python 如何设置柱状图参数
version:python3.6环境:anaconda/JupyterLab0.27.0操作系统:Windows10importpandasaspdimportmatplotlib.pyplotasplta=pd.DataFrame(train_set['收率'].value_counts()).reset_index()a.rename(columns={'index':'yield','收率':'frequency'},inplace=True)a.head()plt.figure(figsize=(24,8))plt.bar(a['yield'].values,a['frequency'].values.round(2),color='rgb',width=0.005,tick_label=a['yield'].values....
继续阅读 >