Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

change y axis scale python

import matplotlib.ticker as tkr 
#define how we want to change scale
def numfmt(x, pos):
    s = f'{x/100:,.0f}' 
    return s
  
yfmt = tkr.FuncFormatter(numfmt)

ax.yaxis.set_major_formatter(yfmt)
 
PREVIOUS NEXT
Tagged: #change #axis #scale #python
ADD COMMENT
Topic
Name
4+1 =