title: Round decimal places seaborn heatmap labels
body: <p>I have a heat map that gets its labels automatically, however some of them are long decimals (I don't understand why because the values I used for the heatmap have 3 decimals, for example 0.009 appears as a long decimal), I would like to round all labels to 4 decimals places. Here is the relevant part of the code:</p>
  <pre><code>table1 = df.pivot('ToxinK','Khill','Fraction') #Putting information from the dataframe into a pivot table
  sns.heatmap(table1,cmap='Purples',norm=LogNorm())
  </code></pre>
  <p><a href="https://i.stack.imgur.com/g54OY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g54OY.png" alt="enter image description here" /></a></p>
  <p>I have tried a solution that I found on <a href="https://github.com/mwaskom/seaborn/issues/1005" rel="nofollow noreferrer">seaborn too long numeric labels</a>, however is not working for me, I don't know why
  Here is the attempt:</p>
  <pre><code>majorFormatter = FormatStrFormatter('%0.4f')
  ax1=sns.heatmap(table1,cmap='Purples',norm=LogNorm())
  ax1.yaxis.set_major_formatter(majorFormatter)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/6s7Cr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6s7Cr.png" alt="enter image description here" /></a></p>
  <p>Any advice or piece of information on how to solve this problem would be incredibly useful. Thanks in advance!</p>