I am trying to create a horizontal barblot with mathplotlib, but I've ran into several problems.
I need to change the size of the whole plot. Currently it is 800x600 by default. I'd like to set the parameters myself and so that the plot would resize into it then. Because for example currently there is too much empty space between the bars and I'd like to enlarge the width of the bars.
If the text (bar header or numeric value) doesn't fit into the plot, it will be left out. I'd like to extend the screen so that the texts would never dissapear.
Here's the sample image that the code outputs:

Here's the sample code:
import numpy as np
import matplotlib.pyplot as plt
people = ('Tom sadf hasidfu hasdufhas d', 'Dick', 'Harry', 'Slim')
y_pos = np.arange(len(people))
performance = 3 + 10 * np.random.rand(len(people))
plt.barh(y_pos, performance, align='center', height=0.3, color="skyblue")
plt.yticks(y_pos, people)
plt.xlabel('Performance')
plt.title('How fast do you want to go today?')
for i, v in enumerate(performance):
plt.text(v + 0.5, i, str(v), color='blue', fontweight='bold')
#plt.show()
filename = "myfilename.png"
plt.savefig(filename)
