0

I'm trying to plot a confusion matrix in a jupyter notebook and the plot does not display properly.

My code is:

import scikitplot
plt.close()

scikitplot.metrics.plot_confusion_matrix(y_test, y_predicted_test)

and this code produces the plot:

enter image description here

Any suggestions on how to get the plot to display properly will be greatly appreciated.

Charles

user274610
  • 509
  • 9
  • 18

2 Answers2

1

If you have matplotlib==3.1.1 version installed, just downgrade it. I have encountered the same problem and version == "3.0.3" works fine.

The problem is with the "imshow" function because the same issue araises when plotting heatmap from the seaborn package.

emerte
  • 58
  • 5
0

try:

import scikitplot


scikitplot.metrics.plot_confusion_matrix(y_test, y_predicted_test)
plt.show()
PV8
  • 5,799
  • 7
  • 43
  • 87