title: How do I bring the xticks in an uneven plot to show correctly?
body: <p><a href="https://i.stack.imgur.com/wxyl6.png" rel="nofollow noreferrer">Uneven plot in the x-axis</a></p>
  <p>I am trying to plot using matplotlib an uneven plot in the x-axis. But the x-ticks are not showing in the correct place. Here is the python code of the image I uploaded. The x-ticks are showing in the bottom left of the image instead of under each data point.</p>
  <pre><code>import numpy as np 
  import matplotlib.pyplot as plt 
  
  ticks = [0.0369, 11.58, 13.41, 13.78, 15.2609, 24.9, 26.7, 61.65]
  xi = list(range(len(ticks)))
  
  rmse_before_without_cm = ([0, 5.6290,  6.5244, 7.7890, 6.0990, 11.1103, 20.1758, 30.4631])
  std_error_rmse_before_without_cm = np.array([0, 0, 0, 0,  0,  0, 0, 0])
  
  rmse_before_with_cm = np.array([0, 4.4034, 4.4712, 3.7395,  3.7687, 7.2956, 2.8387, 19.4628])
  std_error_rmse_before_with_cm = np.array([0, 0, 0, 0, 0, 0, 0, 0])
  
  X_max = 62 
  X_var = ticks
  L = len(X_var) # number of x values
  
  Y_var_1 = rmse_before_without_cm 
  Y_var_err1 = std_error_rmse_before_without_cm 
  
  Y_var_2 = rmse_before_with_cm 
  Y_var_err2 = std_error_rmse_before_with_cm
  
  plt.rcParams[&quot;figure.figsize&quot;] = [6.4, 4.8]
  plt.rcParams['axes.linewidth'] = 2
  
  
  plt.errorbar(X_var,Y_var_1,Y_var_err1,linestyle='None',markersize = 8,\
               marker = '+', capsize = 2, color = 'magenta', label = 'RMSE Before without Joined Cloud Mask')
  
  plt.errorbar(X_var,Y_var_2,Y_var_err2,linestyle='None',markersize = 8,\
               marker = '^', capsize = 2, color = 'black', label = 'RMSE Before with Joined Cloud Mask')
  
  FS = 18 
  FS2 = 16
  plt.xlabel('Cloud Cover $\%$', size=FS)
  plt.ylabel('RMSE', size=FS)
  plt.title('RMSE vs Cloud Cover $\%$', size=FS)
  
  plt.yticks(fontsize = FS - 2) 
  plt.xticks(xi, ticks)
  plt.legend(fontsize = FS2-2) 
  plt.show()
  </code></pre>