IBM / visualize-data-with-python

A Jupyter notebook using some standard techniques for data science and data engineering to analyze data for the 2017 flooding in Houston, TX.
https://developer.ibm.com/patterns/visualize-data-with-python/
Apache License 2.0
59 stars 78 forks source link

2.6.x Plot the Discharge against time gives Warning #86

Open scottdangelo opened 5 years ago

scottdangelo commented 5 years ago
plt.plot(df['datetime'],df['Discharge(cfs)'])
plt.title('Houston Flood discharge at Hunting Bayou stream gauge')
plt.ylabel('Discharge(cfs)')
plt.xlabel('datetime')
ax = plt.gca()
df.set_index('datetime')

# Only label every 20th value
ticks_to_use = df.index[::100]
# label ticks per day
dr = pd.date_range('2017-08-23', periods=9, freq='D')

## Now set the ticks and labels
ax.set_xticks(ticks_to_use)
ax.set_xticklabels(dr)
plt.xticks(rotation='vertical')

plt.show()

yields:


  (prop.get_family(), self.defaultFamily[fontext]))```