Skip to content

Too much space between subplots using facet_row in express #1930

Closed
@robroc

Description

@robroc

plotly==4.1.1
plotly-express==0.4.0
jupyter-lab==1.1.4

When using px.scatter with color and facet_row, the figure adds a ton of space between subplots. Need to give it excessive height to make plots square.

Also, .update_layout( showlegend=False) is not removing the legend. The figure below has 20 subplots.

px.scatter(comps_year, x = 'count', y = 'sum', color = 'YEAR', facet_row= 'COMPANY_CLEAN', width = 500, height = 9000).update_layout(showlegend=False)

Capture

When I remove the width and height parameters, it renders like this:

Capture2

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