matplotlib - How to plot multiple graphs with ax.plot_date() in Python -
i trying plot multiple graphs of excel data using plot_date()
function. there column in excel file contains dates in "2016-10-05 00:00:00" format. using following code:
import pandas pd df = pd.read_excel('file.xlsx') import matplotlib.pyplot plt fig, axes = plt.subplots(nrows=4, ncols=4, figsize=(12,12)) data_cols = df.columns[8:19] data_col, ax in zip(data_cols, axes.ravel()[:11]): ax.plot_date(df[data_col], df['date'])
but when use that,
also, here subset of excel file
obviously not want. how can fix this?
Comments
Post a Comment