python柱状图参数设置
2019-01-18 09:46
309 查看
version:python 3.6
环境:anaconda/JupyterLab 0.27.0
操作系统:Windows 10
import pandas as pd import matplotlib.pyplot as plt a = 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.round(3)) plt.xlabel('yield', fontsize=20) plt.ylabel('frequency', fontsize=20) plt.show()
相关文章推荐
- python:工厂函数应该全部设置默认参数
- python opencv设置摄像头分辨率以及各个参数
- Python 任何参数都设置
- jfreechart柱状图参数设置
- Python 绘图常用参数设置
- python脚本设置运行参数
- Python网络爬虫(1)--url访问及参数设置
- jfreeChart柱状图参数设置
- python函数参数设置问题
- Python:plt.legend或者ax.legend设置图例的参数详解
- 【Python】读取命令行参数、在PyDev中设置Python运行时的参数
- python 调用C++接口的参数设置
- JFreeChart 柱状图参数设置方法
- python matplotlib中文显示参数设置解析
- python opencv设置摄像头分辨率以及各个参数的方法
- Python中函数参数设置及使用的学习笔记
- python matplotlib 中文显示参数设置
- python中用py2exe打包可执行文件的参数设置
- Python爬虫:Scrapy优化参数设置
- 【python】c++调用python文件设置参数Py_BuildValue()