Skip to content

Multiple scattercarpet's #1398

@pfbuxton

Description

@pfbuxton

I have several carpet's and several scattercarpet's.
If you run this then the second scattercarpet (trace 3) is not visible.
If you click trace 2 off then trace 3 becomes visible.

import dash
import dash_core_components as dcc
import dash_html_components as html

import plotly.graph_objs as go

app = dash.Dash(__name__)

traces = []

traces.append(go.Carpet(
    a = [4, 4, 4, 4.5, 4.5, 4.5, 5, 5, 5, 6, 6, 6],
    b = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3],
    y = [2, 3.5, 4, 3, 4.5, 5, 5.5, 6.5, 7.5, 8, 8.5, 10],
    aaxis = dict(
        tickprefix = 'a = ',
        ticksuffix = 'm',
        smoothing = 1,
        minorgridcount = 9
    ),
    baxis = dict(
        tickprefix = 'b = ',
        ticksuffix = 'Pa',
        smoothing = 1,
        minorgridcount = 9
    ),
    carpet='c0'
))

traces.append(go.Carpet(
    a = [4, 4, 4, 4.5, 4.5, 4.5, 5, 5, 5, 6, 6, 6],
    b = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3],
    y = [22, 23.5, 24, 23, 24.5, 25, 25.5, 26.5, 27.5, 28, 28.5, 30],
    aaxis = dict(
        tickprefix = 'a = ',
        ticksuffix = 'm',
        smoothing = 1,
        minorgridcount = 9
    ),
    baxis = dict(
        tickprefix = 'b = ',
        ticksuffix = 'Pa',
        smoothing = 1,
        minorgridcount = 9
    ),
    carpet='c1'
))

traces.append(go.Scattercarpet(
    a = [4, 4.5, 5, 6],
    b = [2.5, 2.5, 2.5, 2.5],
    line = dict(
        shape = 'spline',
        smoothing = 1,
        color = 'blue'
    ),
    mode='lines',
    carpet='c0'
))

traces.append(go.Scattercarpet(
    a = [4, 4.5, 5, 6],
    b = [2.5, 2.5, 2.5, 2.5],
    line = dict(
        shape = 'spline',
        smoothing = 1,
        color = 'red'
    ),
    mode='lines',
    carpet='c1'
))

app.layout = html.Div(children=[
    html.H1(children="Multiple Scattercarpet's"),

    dcc.Graph(
        id='example-graph',
        figure=dict(
            data=traces,
            layout = dict()
        )
    )
])

if __name__ == '__main__':
    app.run_server(debug=True)

problem

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