Area chart

URL: http://bokeh.pydata.org/en/latest/docs/gallery/area_chart.html

Most examples work across multiple plotting backends equivalent, this example is also available for:

In [1]:
import numpy as np
import holoviews as hv
hv.extension('matplotlib')
%output fig='svg'

Declaring data

In [2]:
# create some example data
python=np.array([2, 3, 7, 5, 26, 221, 44, 233, 254, 265, 266, 267, 120, 111])
pypy=np.array([12, 33, 47, 15, 126, 121, 144, 233, 254, 225, 226, 267, 110, 130])
jython=np.array([22, 43, 10, 25, 26, 101, 114, 203, 194, 215, 201, 227, 139, 160])

dims = dict(kdims=['time'], vdims=['memory'])
python = hv.Area(python, label='python', **dims)
pypy   = hv.Area(pypy, label='pypy', **dims)
jython = hv.Area(jython, label='jython', **dims)

Plot

In [3]:
style = dict(alpha=0.5)

overlay = (python * pypy * jython)(style={'Area': style})
overlay.relabel("Area Chart") + hv.Area.stack(overlay).relabel("Stacked Area Chart")
Out[3]:

Download this notebook from GitHub (right-click to download).