Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

matplotlib set number of decimal places

from matplotlib.ticker import FormatStrFormatter

fig, ax = plt.subplots()

ax.yaxis.set_major_formatter(FormatStrFormatter('%.2f'))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #matplotlib #set #number #decimal #places
ADD COMMENT
Topic
Name
6+7 =