spiral_plot.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:scikit-discovery 作者: MITHaystack 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号