Relative Content

Tag Archive for pythonpandasmatplotlib

No lines between datapoints in pyplot

I’m trying to make a simple line plot with matplotlib.pyplot but i don’t get lines between datapoints.
I have a pandas DataFrame with a DateTime index and I want a subplot for each weekday. Everything works fine except when I have data in muliple columns.

Get next axis in a subplots grid

Suppose, I have 9 plots I want to make from a dataframe with 9 columns. So I create 9 axes with fig, axes = plt.subplots(3, 3). Now, I iterate over my 9 columns with for name, data_col in data.items() and do my plotting (for example data_col.value_counts().plot.barh()).