I have a contour plot and I would like to line all the labels along the same line. In the image below for example I would like to arrange each label along the vertical dashed line.
import matplotlib.pyplot as plt
col1 = np.array(list(range(0,1000,100))[::-1])
mat = np.array(col1)
for i in range(1,len(col1)):
mat = np.vstack((mat,col1+100*i))
print(mat)
cont = plt.contour(mat, colors='blue')
plt.clabel(cont, inline=True, fontsize=10)
plt.plot([4.5,4.5],[0,9],color='grey', linestyle='dashed')
plt.show()