import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
df1 = pd.DataFrame({'A':[1,2,3],
'B':[4,5,6],
'C':[7,8,9]})
fig,axes = plt.subplots(1,2,figsize = (10,6))
df1.plot(kind = 'bar',colormap = 'Blues_r',stacked = True,grid = True,ax = axes[0])
df1.plot(kind = 'bar',colormap = 'Reds_r',stacked = False,grid = True,ax = axes[1])
来源:CSDN
作者:chaoqichaoluoe
链接:https://blog.csdn.net/chaoqichaoluoe/article/details/104119280