title: How to adjust x ticks to string values in Python
body: <p>I have an issue plotting a very simple time series figure on Python. I've been playing with Twitter data and my x is days and times, while my y is some score I'm computing based on tweets. The obvious problem is that my x keeps on expanding to the extend that the x axis, when plotted, does not represent all the values of x in my data set. I'm completely fine with that, to be sure, but what I'd want is for the x axis to at least start with the first x value and end with the last x value in my dataset, so that I can assess the evolution of that score in near real time. That would at least create a graph where we can see how much the score I'm computing has evolved since I started collecting tweets, and until the latest day for which I'm plotting the score in question. Here's the code I have so far: </p>
  
  <pre><code>n = datetime.date.today().strftime("%B %d, %Y") #Here I'm registering today's date
  
  a_plot=df_US.plot(x='Some timeframe', y='Some Score')
  a_plot
  
  plt.xticks(rotation=60)
  plt.ylabel('Some Score')
  plt.title('Evolution of Some Score in Tweets',fontdict=None, loc='center')
  plt.savefig('Some Score('+n+').png', dpi=300, bbox_inches = 'tight')
  plt.show()
  </code></pre>
  
  <p>That's what I get based on this script. 
   <a href="https://i.stack.imgur.com/qZcBM.png" rel="nofollow noreferrer">Some Time Series Plot</a>       </p>
  
  <p>I'm fine with the x axis starting where it does, only I'd like it to end for the latest value of x in the dataset. I'm also fine with there being less ticks in between. </p>
  
  <p>I scoured the web for an answer to this issue but unfortunately I only find answers for integer values or for a finite number of strings. Any help would be appreciated!</p>