我有一个有4个子图,我可以选择使用下拉菜单。在
我试图将这些“填充”(fill='tonexty'
)添加到绘图中,但是每当我添加它们时,以前自动缩放并从110开始的yaxis将重新缩放为从0开始。我希望它的范围是自动调整的,因为它是以前添加“填充”。在
检查下面的图像,查看将填充添加到图表中的“之前”和“之后”:
我曾尝试将autorange=True
添加到图形的布局中,但没有成功。在
你可以看看我下面的布局。在
layout = go.Layout(
title="Cotação do Café em Dólares Americanos (U$)",
xaxis=dict(
title="Período",
titlefont=dict(
family='Courier New, monospace',
size=18,
color='#7f7f7f'
)
),
yaxis=dict(
title="Valor U$",
autorange=True,
titlefont=dict(
family='Courier New, monospace',
size=18,
color='#7f7f7f'
)
),
updatemenus=list([
dict(
buttons=list([
dict(
args=['visible', [True, False, False, False]],
label='Variação Anual',
method='restyle'
),
dict(
args=['visible', [False, True, False, False]],
label='Variação Semestral',
method='restyle'
),
dict(
args=['visible', [False, False, True, False]],
label='Variação Mensal',
method='restyle'
),
dict(
args=['visible', [False, False, False, True]],
label='Variação Semanal',
method='restyle'
)
]),
)
]),
)
这是绘图的Scatter
,这是我添加填充的地方:
目前没有回答
相关问题 更多 >
编程相关推荐