1
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.text(0.2,0.2, 'A', fontsize=20)
ax.text(0.5,0.5, 'B', fontsize=20, fontstretch='ultra-expanded')
plt.show()

"A" and "B" are showing exactly the same, and I don't want that. The fontstretch parameter is doing nothing. How can I get the font to stretch like I want it to?

EDIT: I am trying to get the horizontal width of the letters themselves changed, not the spacing between them.

2
  • Changing the text does nothing for me. Note, I am running Python 3.7 with Matplotlib 3.0. Commented Jan 1, 2020 at 16:30
  • Maybe I need to clarify my question. I don't want the spacing between the letters changed. I want the width of the letters themselves changed. Commented Jan 1, 2020 at 17:00

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.