Sunday, 15 January 2012

python - Prevent line smoothing in vicent area chart -



python - Prevent line smoothing in vicent area chart -

i'm plotting pandas dataframe using python vincent. each subsequent period, new grouping added, vincent handles nicely matplotlib not. automatic smoothing in vincent, however, causing curves extend out info should not exist. here vincent chart:

vincent.stackedarea(granite)

with bit of manipulation in pandas, can desired graph in matplotlib. how can output in vincent?

granite2 = granite.cumsum(axis=1) index = granite2.index.values slant = granite2.fillna(method="ffill", axis=1, limit=1) plt.fill_between(index, 0, granite2[index[0]].values) in range(0,len(index)-1): plt.fill_between(index[i:], granite2[index[i]].values, slant[index[i+1]].values)

python vincent

No comments:

Post a Comment