Skip to content

Weird ordering of elements in Parallel Categories Plot #6803

Open
@malteschwerin

Description

@malteschwerin

grafik
I'm currently using the parallel categories plot in plotly express to display and compare different rankings of elements. I know I'm slightly misusing this plot here, but I still think that my problem should be relevant to others as well. In the example I attached, for simplicity I'm only showing one ranking ("Ranking 1"), where competitor 0 is on the first place and the other competitors share second place. In practice, I would do this with multiple rankings as parallel coordinates, which usually have fewer and fewer distinct ranks going from left to right. As you can also see in the image, the competitors on rank 2 have a weird ordering for some reason, which is why I'm writing here. The dataframe I'm using here looks like this:
index Name Ranking 1
0 0 1
1 1 2
2 2 2
3 3 2
4 4 2
5 5 2
6 6 2
7 7 2
8 8 2
9 9 2
10 10 2
11 11 2
12 12 2
13 13 2
14 14 2
15 15 2
16 16 2
17 17 2
18 18 2
19 19 2
20 20 2
21 21 2

While I usually change some parameters, it looks exactly like this when just calling px.parallel_categories(px). So I really don't see why any of the connecting lines are overlapping. It would be great if I could use this plot like this without creating extra confusion coming from crossing lines.

I used version 5.9 before, but just updated to the latest version (5.18.0) and the issue remains.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething brokensev-3annoyance with workaround

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions