Reputation: 4797
I'm using the following code to generate a bubble plot using plotly
:
Dataframe.iplot(kind='bubble', x='branch', y='retention', size='active_users', text='active_users',
xTitle='', yTitle='Retention',
filename='cufflinks/PlotName')
I'd like to set a manual range for Y axis. Any help would be appreciated.
Upvotes: 14
Views: 33973
Reputation: 2782
A solution that works with subplots is:
fig.update_yaxes(range=[0, 0.4], row=1, col=1)
Upvotes: 20
Reputation: 4797
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)
This will do the trick.
Upvotes: 14