Skip to content

layout.shape.layer = 'below' does not work when using plotly.offline.plot #572

@manihamidi

Description

@manihamidi

The layout.shape.layer = 'below'option works fine when using the plotly.plotly.plot() function. i.e. it puts the rectangle below any plotted traces.

However, when plotly.offline.plot() is used, irrespective of whether the value of that parameter is set to 'below' or 'above', the shape appears on TOP of the traces...

I'm just trying to shade a region behind some bar plots... i.e. the equivalent of axhspan in matplotlib.

layout = {
'barmode': 'stack',
'shapes': [
    {
        'type': 'rect',
        'x0': 0,
        'y0': 5,
        'x1': 20,
        'y1': 10,
        'layer': 'below',
        'fillcolor': 'rgba(128, 0, 128, 0.3)'
    }]
}

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