MatPlotlib解决中文和负号问题
![](http://www.crazyant.net/wp-content/uploads/2021/06/wp_editor_md_6e5764dbaec94f5d7563c62f12151a22.jpg)
import matplotlib.pyplot as plt
import pandas as pd
import xlwings as xw
df = pd.read_excel('销售业绩表.xlsx')
figure = plt.figure()
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
Pandas设置行列不忽略、展示行数列数
pd.set_option('display.max_rows', 100000)
pd.set_option('display.max_columns', 1000)
matplotlib多个子图
plt.subplot(3, 1, 1)
plt.bar(line_all["bigger"].index, line_all["total"])
plt.title(f'count total')
plt.subplot(3, 1, 2)
plt.bar(line_all["bigger"].index, line_all["bigger"])
plt.title(f'count big than {min_second_count}')
plt.subplot(3, 1, 3)
plt.bar(line_rate.index, line_rate.values)
plt.title(f'count big than {min_second_count} than rate total')
plt.show()
![](http://www.crazyant.net/wp-content/uploads/2021/08/wp_editor_md_4a91fa3f54aa0bad306a6de51a6a4260.jpg)