14

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.

2 Answers 2

20

A solution that works with subplots is:

fig.update_yaxes(range=[0, 0.4], row=1, col=1)
Sign up to request clarification or add additional context in comments.

2 Comments

how do you set your fig?
oops. @EliBorodach, sorry for the delay. ax, fig = plt.subplots(...)
14
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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.