Ok, so I have an excel with 15000 measurements, (1st column:timestamps, 2nd column values). I want to represent them to a plot, where on the y-axis will be the measurements (the graph) and on the x-axis totally 20-25 values. I cannot obviously put 15000 xticks. I follow this code:
import datetime as dt import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates time = mdates.drange(dt.datetime(2014, 12, 20), dt.datetime(2015, 1, 2), dt.timedelta(hours=2)) y = np.random.normal(0, 1, time.size).cumsum() y -= y.min() fig, ax = plt.subplots(figsize=(8, 6)) ax.plot(time, y, 'bo-') ax.set(title='Active Calls', ylabel='Calls', xlabel='Time') ax.grid() ax.xaxis_date() # Default date formatter fig.autofmt_xdate() plt.show()and I try to do modifications to the code in order to make it work...but I got errors like the one above. Can you help me?