0

I am plotting some frequencies inside a pandas dataframe, thus I decided to use the plot functionality:

fig, ax = subplots()
df3.timestamp.value_counts().sort_index().plot(figsize=(25,10), colormap='jet',fontsize=20, kind='bar')
ax.grid()

enter image description here

However, since I have multiple timestamps my graphic looks like the above picture. How can I fix the x axis labels by just showing the most representative dates?

anon
  • 836
  • 2
  • 9
  • 25
  • 1
    What does "representative" mean in this context? And [a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) is of course missing. – Mr. T Jul 21 '18 at 14:26
  • 1
    Have you looked through [The Gallery](https://matplotlib.org/gallery/index.html) to see if there is an example you could adapt? Like maybe in [Ticks and spines](https://matplotlib.org/gallery/index.html#ticks-and-spines)? ... From the Pandas docs - `The plot method on Series and DataFrame is just a simple wrapper around plt.plot()` : so you should reference the Matplotlib documentations for any customization/tweaks you need to make to your DataFrame plots. – wwii Jul 21 '18 at 14:39
  • This is most certainly a duplicate question, but with so many possible solutions it's hard to pick which one - a web search of `python matplotlib x axis dates overlap` should prove fruitful. – wwii Jul 21 '18 at 14:54

0 Answers0