Skip to content

How to set height in plotly make_subplots? #1596

@eromoe

Description

@eromoe

I follow https://plot.ly/pandas/subplots/

I have a dataframe with 10 group , each group has 845 point by hour from 2019-01-01 to 2019-06-03 .

My code:

    import plotly.plotly as py
    import plotly.tools as tls
    
    from plotly.offline import iplot,init_notebook_mode
    
    import cufflinks as cf
    cf.go_offline(connected=True)
    
    sids = pdf.store_id.unique()
    fig = tls.make_subplots(rows=len(sids), cols=1, shared_xaxes=True)
    for sid in sids:
        td = pdf[pdf.store_id==sid]
        fig.append_trace({'x': td['date'], 'y': td['sale_count'], 'type': 'scatter', 'name': sid }, 1, 1)
    
    iplot(fig, filename='pandas/mixed-type subplots')

Result plot is ugly :

enter image description here

I'd lile see the lines expand whole space in yaxis, and move right to see hidden line in xaxis.

I don't find a height parameter in tls.make_subplots .
How do I set the height for this plot ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions