a matplotlib solution
modify the width
parameter in ax.bar
as you like

code
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
df = pd.DataFrame(np.arange(15).reshape(5, 3), columns=list('ABC'))
print(df)
fig, axs = plt.subplots(1, 2)
ax = axs[0]
xs = np.arange(df.shape[1])
ys = np.zeros(xs.shape)
for ind in df.index:
ax.bar(xs, df.loc[ind, :], label=ind, bottom=ys, width=.4)
ys += df.loc[ind, :]
plt.setp(ax, xticks=xs, xticklabels=list(df))
ax.legend(title='rows')
ax.set_xlabel('columns')
ax = axs[1]
xs = np.arange(df.shape[0])
ys = np.zeros(xs.shape)
for col in list(df):
ax.bar(xs, df.loc[:, col], label=col, bottom=ys, width=.4)
ys += df.loc[:, col]
plt.setp(ax, xticks=xs, xticklabels=df.index.to_numpy().tolist())
ax.legend(title='columns')
ax.set_xlabel('rows')
plt.show()
df=
A B C
0 0 1 2
1 3 4 5
2 6 7 8
3 9 10 11
4 12 13 14