Reputation: 23
I'm trying to make a Parallel Coordinates plot with plotly.graph_objs Here is my code.
'''
import plotly.graph_objs as go
layout = go.Layout( autosize=False, width=800, height=600)
fig = go.Figure(data =
go.Parcoords(
dimensions = list([
dict(range = [1,9],
label = 'col1', values = df.col1),
dict(range = [1,9],
label = 'col2', values = df.col2),
dict(range = [1,9],
label = 'col3', values = df.col3)
])
), layout = layout
)
fig.show()
'''
This graph works, but I need to reversed y-axis. Here 3 are what i tried
Upvotes: 2
Views: 424
Reputation: 4407
If I understood correctly you could just reverse the range
parameter:
import plotly.graph_objs as go
layout = go.Layout( autosize=False, width=800, height=600)
fig = go.Figure(data =
go.Parcoords(
# Reversed ranges.
dimensions = list([
dict(range = [9, 1],
label = 'col1', values = df.col1),
dict(range = [9, 1],
label = 'col2', values = df.col2),
dict(range = [9, 1],
label = 'col3', values = df.col3)
])
), layout = layout
)
fig.show()
'''
Before (fake data):
Upvotes: 1