Want to adjust the bar width if plotting for only single data set. Any suggestions or help is appreciated. Thanks in advance.
import matplotlib.pyplot as plt
name = ['Windows']
count = [9]
plt.style.use('seaborn')
fig, ax = plt.subplots(figsize=(10, 5), squeeze=True)
plt.subplots_adjust(left=0.136, right=0.87, top=0.9, bottom=0.1)
plt.barh(name, width=count, label=name, align='center')
title = ax.set_title("Operating Systems", position=(.5, 1.02), bbox={'facecolor': '0.8', 'pad': 5})
for index, value in enumerate(count):
plt.text(value, index, str(value))
plt.xticks([])
plt.show()
Actual Bar Plot
Desired Bar Plot
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…