Skip to content

Instantly share code, notes, and snippets.

@bigtonylewis
Created April 16, 2013 14:48
Show Gist options
  • Save bigtonylewis/5396525 to your computer and use it in GitHub Desktop.
Save bigtonylewis/5396525 to your computer and use it in GitHub Desktop.
container = VPlotContainer()
priceData = ArrayPlotData(...)
pricePlot = Plot(priceData)
pricePlot.plot(("seq", "sma"), type = "line", color = "black")
pricePlot.tools.append(PanTool(pricePlot))
container.add(pricePlot)
rsiPlot = Plot(priceData)
rsiPlot.plot(("seq", "rsi"), type="line", color="green")
rsiPlot.tools.append(PanTool(rsiPlot))
# link the ranges
pricePlot.index_mapper.range = rsiPlot.index_mapper.range
container.add(rsiPlot)
return container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment