Home > database >  Adjust matplotlib RadioButtons font size
Adjust matplotlib RadioButtons font size

Time:12-28

I wonder if anyone has an advice on how to adjust the font size on the RadiouButtons side text. Taking the enter image description here

How could I make "2Hz, 4Hz, 8Hz" larger?

It is possible to adjust the buttons size by accessing the Circle objects on the RadioButtons. Is there something similar to the font size? (the buttons widget have the .label.set_fontsize() attribute but I have not found a similar thing for this widget)

CodePudding user response:

In order to change the font size of the RadioButton labels you need to access the properties of the individual label:

for r in radio.labels: r.set_fontsize(16)
  • Related