I have a bar plot which is being returned to me (i have access to the AxesSubplot object) which already has some labels on the bars. The issue is they are illegible and i would like to enlarge them (or clear and reset them). Take the following code for example:
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({'a':['red','green','blue'], 'b':[4,8,12]})
plot = df.plot(kind='barh')
for i in plot.patches:
plot.text(i.get_width()+.01, i.get_y()+.38, str(i.get_width()), fontsize=31)
This generates a nice bar plot with labels on the bars. But lets say i want to remove or change those labels, how can this be done?
for i in plot.patches..., or to change the size, change thefontsizeargument?