python - Histograms plots over multiple Time Series -


i have pandas data set group data day. take data , plot histrograms each day on same plot offset day in data occured. researched item , stated need use pcolor, nice alternative

here link example data..

http://pastebin.com/rkzj5qzf

i attempted use lambda function in below post,which create series. pcolor not series , says need more 1 value unpack..

stackoverflow.com/questions/17050202/plot-timeseries-of-histograms-in-python

does know doing wrong? edit: output pasted series 'df' in following running following code snippet:

daily = x1.groupby(x1.date).price f = lambda x: pd.series(np.histogram(x, bins=bins)[0], index=bins[:-1]) df=daily.apply(f) 

once, attempt pass matplotlib

import matplotlib plt plt.pcolor(df.t) 

this problem. have 3 items :date,price, count edit:::traceback

--------------------------------------------------------------------------- valueerror                                traceback (most recent call last) <ipython-input-2-460b943e4ead> in <module>() ----> 1 plt.pcolor(df.t)  /usr/lib/pymodules/python2.7/matplotlib/pyplot.pyc in pcolor(*args, **kwargs)    2926         ax.hold(hold)    2927     try: -> 2928         ret = ax.pcolor(*args, **kwargs)    2929         draw_if_interactive()    2930     finally:  /usr/lib/pymodules/python2.7/matplotlib/axes.pyc in pcolor(self, *args, **kwargs)    7543         shading = kwargs.pop('shading', 'flat')    7544  -> 7545         x, y, c = self._pcolorargs('pcolor', *args, allmatch=false)    7546         ny, nx = x.shape    7547   /usr/lib/pymodules/python2.7/matplotlib/axes.pyc in _pcolorargs(funcname, *args, **kw)    7339         if len(args) == 1:    7340             c = args[0] -> 7341             numrows, numcols = c.shape    7342             if allmatch:    7343                 x, y = np.meshgrid(np.arange(numcols), np.arange(numrows))  valueerror: need more 1 value unpack 


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -