I'm trying to create a barchart that keeps always a fixed distance between outer and inner position, regardless of the labels length. I would like to see bar and bar\_long in the same position as bar\_long and bar\_perfect do. I've tried to work with axes.set\_position(), but in vain. Thanks in advance for appreciated help!

```
import matplotlib.pyplot as plt

def createBar(figx, figy, labels):
    fig, ax = plt.subplots(figsize=(figx, figy)
    performance = [10, 70, 120]
    ax.barh(labels, performance)
    return fig
bar = createBar(2, 1, ('Tom', 'Dick', 'Fred'))
bar_long = createBar(2, 1, ('Tom Cruise', 'Dick & Doof', 'Fred Astaire'))
bar_perfect = createBar(2, 1, ('            Tom', 'Dick', 'Fred'))

```

[![enter image description here](https://i.stack.imgur.com/Xo5xA.png)](https://i.stack.imgur.com/Xo5xA.png)