使用plotly修改轴范围

Pat*_*bug 6 python plotly

我正在使用以下代码生成气泡图plotly:

Dataframe.iplot(kind='bubble', x='branch', y='retention', size='active_users', text='active_users',
             xTitle='', yTitle='Retention',
             filename='cufflinks/PlotName')
Run Code Online (Sandbox Code Playgroud)

我想设置Y轴的手动范围.任何帮助,将不胜感激.

aer*_*man 9

适用于子图的解决方案是:

fig.update_yaxes(range=[0, 0.4], row=1, col=1)
Run Code Online (Sandbox Code Playgroud)


Pat*_*bug 5

import plotly.graph_objs as go    
layout = go.Layout(
        yaxis=dict(
            range=[0, 0.4]
        )
    )

    Dataframe.iplot(kind='bubble', x='branch', y='retention', size='active_users', text='active_users',
                 xTitle='', yTitle='Retention',
                 filename='cufflinks/PlotName', layout = layout)
Run Code Online (Sandbox Code Playgroud)

这将达到目的。