I am not being able to generate a stacked graph with the error below:
TypeError: There is no Line2D property "stacked"
My csv has the format:
feb-17,1,2,3
apr-17,2,4,3
may-18,3,5,3
oct-20,4,1,1
dec-21,5,1,1
I would expect to see something like:
My code is:
import pandas
import matplotlib.pyplot as plt
df = pandas.read_csv(datacsv.csv, delimiter=',',
index_col=0,
parse_dates=[0], dayfirst=True,
names=['Date','Black','Red', 'Yellow'])
df.plot(Stacked=True, marker='.',markersize=8, title ="My graph", fontsize = 10, color=['b','g','c'], figsize=(15, 15))
imagepathprotocol = "image.png"
plt.savefig(imagepathprotocol)
Any idea what can be done? Thanks a lot.
