การพลอต Confusion Matrix ที่แกนเป็นข้อความ (Class names) แทนตัวเลข ใน Matplotlib ทำได้โดยใช้ ax.matshow() แสดงเมทริกซ์ แล้วตั้งค่า tick labels ด้วย set_xticklabels() และ set_yticklabels() ขั้นตอนการทำงาน นำเข้า matplotlib.pyplot และ sklearn.metrics.confusion_matrix กำหนดรายการ Labels (ชื่อคลาส