Skip to content

Shapes layer: 'below' doesn't play well with subplots #1452

Closed
@alexcjohnson

Description

@alexcjohnson

I'm not sure this really has a solution even theoretically, if you consider the layering that needs to happen with inset plots (where the background of the inset plot needs to be drawn on top of the data of the main plot) but posting as a bug for discussion purposes since it's at the very least unexpected.

If you make a layer: 'below' shape that's data-referenced on one axis and paper-referenced on another, and it crosses two subplots (which could actually be a very nice way to highlight correlations between these subplots) the shape will NOT be below the data of both subplots.

Plotly.newPlot(gd,[
    {y:[1,2,3]},
    {y:[1,2,3],yaxis:'y2'}
],{
    yaxis:{domain:[0,0.4]},
    yaxis2:{domain:[0.6,1]},
    shapes:[{
        xref:'x',yref:'paper',type:'rect',
        x0:0.8,x1:1.2,y0:0,y1:1,
        fillcolor:'#eee',layer:'below'
    }]
})

screen shot 2017-03-08 at 12 38 35 am

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