How not to use Scientific Notation in Seaborn’s heatmap
Oct 29, 2020
Understanding sns.heatmap()
We use heatmap for many tasks like correlation matrix, confusion matrix, similarity matrix, distance matrix, etc.
Let’s see an example of plotting a heatmap of the confusion matrix…
You can see in the above picture that heatmap is not printing the actual number but instead in scientific notation.
See the below img to understand it better.
you can see that by default format of fmt
is '.2g'
. So, just make it 'g'
. then everything is ok.
Result:
If you have any problem which Google can’t solve. give me an opportunity at
@mdiqbalbajmi00786@gmail.com.
Thanks.