Black Lives Matter. Please consider donating to Black Girls Code today.

Subplots with parallel coordinates - not showing second subplot

Dear all,

I would like to create two subplots with parallel coordinates, but it is only plotting the subplot properly.
Here is my code:

import pandas as pd
import plotly.graph_objects as go

df_a = pd.DataFrame([[1, 5, 3, 4], [2, 3, 4, 2]], columns = ['A', 'B', 'C', 'D'])
df_b = pd.DataFrame([[10, 23, 35, 41], [12, 13, 14, 15]], columns = ['A', 'B', 'C', 'D'])

fig_com = go.Figure(data = [
    go.Parcoords(
        domain={
            'x': [0, 1],
            'y': [0, 0.23]
        },
        dimensions = list([
            dict(label = 'a', values = df_a['A']),
            dict(label = 'b', values = df_a['B']),
            dict(label = 'c', values = df_a['C']),
            dict(label = 'd', values = df_a['D']),
        ])),
    go.Parcoords(
        domain={
            'x': [0, 1],
            'y': [0.5, 1]
        },
        dimensions = list([
            dict(label = 'a', values = df_b['A']),
            dict(label = 'b', values = df_b['B']),
            dict(label = 'c', values = df_b['C']),
            dict(label = 'd', values = df_b['D']),

        ]))
    ]
)     

fig_com.show()

I used pretty much the same code for sankey diagrams and it worked fine. Any ideas what I am doing wrong here?

Best regards
Mare

Hi @mare, welcome to the forum! Unfortunately this is a known issue documented in https://github.com/plotly/plotly.js/issues/3361. You can subscribe to the issue to be notified of future developments. In the meantime I think you can only create separate figures.