Hi, how can I change the format of the range ticks so that they display 2 decimal places while other tick labels stay unchanged?
Hi @chaoslight ,
Welcome to the community!
If I am not mistaken your question, you ask to change the tickformat
in every dimensions.
You can set tickformat
attribute in every dimensions to display different the decimal precision.
Here the example :
Dimension A is set 4 digits after decimal point.
Dimension B is set 3 digits after decimal point.
Dimension C is set 2 digits after decimal point.
Dimension D is stay default.
import plotly.graph_objects as go
fig = go.Figure(data=
go.Parcoords(
line_color='blue',
dimensions = list([
dict(range = [1,5],
tickformat = ".4f",
constraintrange = [1,2], # change this range by dragging the pink line
label = 'A', values = [1,4]),
dict(range = [1.5,5],
tickformat = ".3f",
tickvals = [1.5,3,4.5],
label = 'B', values = [3,1.5]),
dict(range = [1,5],
tickformat = ".2f",
tickvals = [1,2,4,5],
label = 'C', values = [2,4]),
dict(range = [1,5],
label = 'D', values = [4,2])
])
)
)
fig.show()