Skip to content

PX auto-detect orientation for box/violin/histogram #2331

Closed
@nicolaskruchten

Description

@nicolaskruchten

This shouldn't error out:

import plotly.express as px
import numpy as np
px.histogram(y=np.random.rand(100))

And this shouldn't render a blank plot:

import plotly.express as px
import numpy as np
px.box(x=np.random.rand(100))

Because in both cases PX should be smart enough to set orientation. In fact, even if both x and y are set, if one is categorical and the other isn't, we should be able to auto-detect the correct orientation (this would work well for bar also).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions