This is my code:
def fig_sankey_creator(sankey_label, sankey_source, sankey_target, sankey_value, node_color, link_color):
fig_sankey = go.Figure(data = [go.Sankey(
node = dict(
label = sankey_label,
color = node_color,
pad = 10,
),
link = dict(
source = sankey_source,
target = sankey_target,
value = sankey_value,
color = link_color,
))])
fig_sankey.update_layout(
title_text = "Sankey diagram",
height = 800,
width = 1600,
)
fig_sankey.update_yaxes(ticklabelposition = "outside")
return fig_sankey
What I want to change is the axis labels not to be inside the plot but outside. How to achieve that? The ticklabelposition
outside
does not work. Thanks!