def run_spiralInteractive(inData, period, pParams = [], inIndex = None, mainTitle = 'Spiral plot', barLabel = 'Amplitude', plotTS = False):
'''
Wrapper for plot_spiral that is interactive when used in Jupyter notebooks
@param inData: Input data to use in plot
@param period: Period value with which to wrap data around the plot
@param pParams: List of plot's period parameters [min, max, step] necessary for interactive
@param inIndex: Input index (series time coordinates)
@param plotTS: Optional flag to plot the time series of the data in a separate window
'''
from ipywidgets import fixed, interact, interactive
from IPython.display import clear_output, display, HTML
plotData, plotIndex = mod_data(inData, inIndex)
if len(pParams) != 3:
pParams = [period - .1, period + .1, .01]
inter = interactive(plot_spiral, plotData = fixed(plotData), plotIndex = fixed(plotIndex), mainTitle = fixed(mainTitle), barLabel = fixed(barLabel), plotTS = fixed(plotTS), T = (pParams[0], pParams[1], pParams[2]))
display(inter)
评论列表
文章目录