Jupyter notebook ipywidgets在Interactions小部件旁边获取输出绘图

Jupyter notebook ipywidgets在Interactions小部件旁边获取输出绘图,jupyter-notebook,heatmap,display,ipywidgets,Jupyter Notebook,Heatmap,Display,Ipywidgets,我有许多交互式小部件,它们生成了一个作为输出的热图。希望在交互小部件旁边显示输出。交互式小部件确定如何过滤数据和显示 def myGrid(in1,in2,date,in3): Df = data[in1].loc[date] DfRank = dataRank1[in2].loc[date] with out: df=Df.xs(in3, level=0)) dfRank=DfRank.xs(in3, lev

我有许多交互式小部件,它们生成了一个作为输出的热图。希望在交互小部件旁边显示输出。交互式小部件确定如何过滤数据和显示

def myGrid(in1,in2,date,in3):

    Df = data[in1].loc[date]
    DfRank = dataRank1[in2].loc[date]
    
    with out:
        
        df=Df.xs(in3, level=0))
        dfRank=DfRank.xs(in3, level=0))
        fig, ax = plt.subplots(figsize=(10,5))
        sns.heatmap(dfRank, annot=df, fmt='.1f', linewidths=.5)
    
out=widgets.Output()
# Define the layout here.
box_layout = widgets.Layout(display='flex', flex_flow='column', justify_content='space-between',align_items='center',positioning='left')
widgets.interact(myGrid,in1=h3,in2=h4,date=d1,in3=h2)
display(widgets.Box([out,h3,h4,d1,h2],layout=box_layout))
交互是下拉的。输出显示两组交互子项 如何在右侧显示交互,在左侧显示输出