如何在情节互动的 iplot 中保留和移动轴?我已经尝试了以下代码,但没有运气。
fig['layout']['yaxis']['autorange'] = "reversed"
import ipywidgets as widgets
from ipywidgets import interact, interact_manual
@interact
def scatter_plot(x=list(df.select_dtypes('number').columns),
y=list(df.select_dtypes('number').columns)[1:],
theme=list(cf.themes.THEMES.keys()),
colorscale=list(cf.colors._scales_names.keys())):
df.iplot(kind='scatter', x=x, y=y, mode='markers',
xTitle=x.title(), yTitle=y.title(),
title=f'{y.title()} vs {x.title()}',
theme=theme, colorscale=colorscale)