X_new = np.linspace(1, len(cumsum), num=len(cumsum)).reshape(-1,1)
plt.ylabel('Explained Variance')
plt.xlabel('Dimensions')
plt.plot(X_new, cumsum, 'b-')
The above code gives a graph with x -axis starting from 0,100,200,300...800. But I want to shows X axis label as 0,50,100,150,200,250.....800. How do i do that. I tried with retstep =True and step =50 but could not obtain the desired label in X-axis with np.linespace()