Python 是否有方法更改Plotly Sankey图表中的文本对齐方式?

Python 是否有方法更改Plotly Sankey图表中的文本对齐方式?,python,plotly,text-alignment,sankey-diagram,plotly-python,Python,Plotly,Text Alignment,Sankey Diagram,Plotly Python,我试图将节点标签的方向更改为位于节点左侧和空白处,以获得更好的可读性,类似于“C”标签的对齐方式 这似乎是不可能的 import plotly.graph_objects as go fig = go.Figure(data=[go.Sankey( node = dict( pad = 15, thickness = 20, line = dict(color = "black", width = 0.5), label = ["A1"

我试图将节点标签的方向更改为位于节点左侧和空白处,以获得更好的可读性,类似于“C”标签的对齐方式


这似乎是不可能的
import plotly.graph_objects as go

fig = go.Figure(data=[go.Sankey(
    node = dict(
      pad = 15,
      thickness = 20,
      line = dict(color = "black", width = 0.5),
      label = ["A1", "A2", "B1", "B2", "C1", "C2"],
      color = "blue"
    ),
    link = dict(
      source = [0, 1, 0, 2, 3, 3], # indices correspond to labels, eg A1, A2, A2, B1, ...
      target = [2, 3, 3, 4, 4, 5],
      value = [8, 4, 2, 8, 4, 2]
  ))])

fig.update_layout(title_text="Basic Sankey Diagram", font_size=10)
fig.show()