0

I have plotted the confusion matrix this way:

import pandas as pd
array = [[tn, fp],
         [fn, tp]]

df_cm = pd.DataFrame(array, index = [i for i in classes],
                  columns = [i for i in classes])
plt.figure(figsize = (12, 12))

sns.heatmap(df_cm, annot = True, cmap = 'Oranges')

enter image description here

How to change scientific notation format to integer, without **"e"** ? And how to remove colorbar

BigBen
  • 38,994
  • 6
  • 24
  • 37
  • 1
    is `sns` seaborn? you might want to add the tag and import it – Sembei Norimaki Feb 15 '22 at 19:59
  • Set the `fmt` string to whatever you want as covered in [this answer](https://stackoverflow.com/a/29648332) to remove the scientific notation. To remove the color bar just set the `cbar` argument as covered in [this answer](/a/69347137). Together something like: `sns.heatmap(df_cm, annot=True, cmap='Oranges', fmt='g', cbar=False)` – Henry Ecker Feb 15 '22 at 20:14
  • thanks a lot, it helped me – Alexander APS Feb 15 '22 at 20:24

0 Answers0