Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have a button in matplotlib, i.e.
myButton = Button(axpos, 'This is a button')
How do I make the text inside the button smaller?
To change the font size of a matplotlib text, use text.set_fontsize(12). To get the text of the button, use myButton.label.
text.set_fontsize(12)
myButton.label
Combine the two:
myButton.label.set_fontsize(12)
Add a comment
Use this: myButton.label.set_fontsize('smaller') OR you can put in the particular size you want: myButton.label.set_fontsize(10)
myButton.label.set_fontsize('smaller')
myButton.label.set_fontsize(10)
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.