Home > Blockchain >  How do you set the formating of axis labels via secondary_yaxis?
How do you set the formating of axis labels via secondary_yaxis?

Time:11-25

How do you set the formatting of axis labels via enter image description here

CodePudding user response:

import matplotlib.ticker as ticker

secax.yaxis.set_major_formatter(ticker.StrMethodFormatter("{x:g}"))

or

secax.yaxis.set_major_formatter(ticker.FormatStrFormatter("%g"))

enter image description here

  • Related