ax.set_xticks([0 , FP1, FP2, FP3, w])
ax.set_xticklabels(['0' , 'FP1' , 'FP2' , 'FP3' , 'Neg' ])
ax.set_yticks([0 , TP1, TP2, h])
ax.set_yticklabels(['0' , 'TP1' , 'TP2-3' , 'Pos' ])
for gx in range (grid_step, w + 1 , grid_step):
ax.axvline(x= gx, linestyle= 'dotted' , color= 'gray' )
for gy in range (grid_step, h + 1 , grid_step):
ax.axhline(y= gy, linestyle= 'dotted' , color= 'gray' )
x_diag = np.array([0 , w])
y_diag = (h / w) * x_diag
ax.plot(x_diag, y_diag, color= 'gray' )
x_diag2 = np.array([0 , w])
y_diag2 = x_diag2
ax.plot(x_diag2, y_diag2, linestyle= 'dashed' , color= 'black' )
x_diag3 = np.array([0 , w])
y_diag3 = (h / w) * (x_diag3 - 10 )
ax.plot(x_diag3, y_diag3, linestyle= 'dashed' , color= 'black' )
ax.plot(FP1, TP1, marker= 'o' , color= 'blue' )
ax.text(FP1, TP1, "C1" , va= 'bottom' , ha= 'center' )
ax.axhline(y= TP1, color= 'blue' , linestyle= 'dotted' )
ax.axvline(x= FP1, color= 'blue' , linestyle= 'dotted' )
ax.plot(FP2, TP2, marker= 'o' , color= 'red' )
ax.text(FP2, TP2, "C2" , va= 'bottom' , ha= 'center' )
ax.axhline(y= TP2, color= 'red' , linestyle= 'dotted' )
ax.axvline(x= FP2, color= 'red' , linestyle= 'dotted' )
ax.plot(FP3, TP3, marker= 'o' , color= 'green' )
ax.text(FP3, TP3, "C3" , va= 'bottom' , ha= 'center' )
ax.axhline(y= TP3, color= 'green' , linestyle= 'dotted' )
ax.axvline(x= FP3, color= 'green' , linestyle= 'dotted' )
ax.set_xlabel("Negatives" )
ax.set_ylabel("Positives" )
plt.show()