Skip to content

plot empty dataframe fails if facet_col/row is specified #3984

Closed
@Gabriel-ROBIN

Description

@Gabriel-ROBIN

In most cases plotting with an empty data_frame works nicely, I mean, it shows a figure with no traces but with the good layout.
But if we specify a facet_col or facet_row it fails.

import plotly.express as px
import pandas as pd
px.bar(
    pd.DataFrame(columns=['A', 'B', 'X']),
    x = 'A',
    y = 'X',
    facet_col = 'B'
)

I would expect the same result as if facet_col was None. As it is already the case for animation_frame

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions