3

Is it possible to remove the white shadow of the font in the following sankey diagram?

enter image description here

    import plotly.graph_objects as go
    
    fig = go.Figure(go.Sankey(
        arrangement = "snap",
        node = {
            "label": ["A", "B", "C", "D", "E", "F"],
            "x": [0.2, 0.1, 0.5, 0.7, 0.3, 0.5],
            "y": [0.7, 0.5, 0.2, 0.4, 0.2, 0.3],
            'pad':10},  # 10 Pixels
        link = {
            "source": [0, 0, 1, 2, 5, 4, 3, 5],
            "target": [5, 3, 4, 3, 0, 2, 2, 3],
            "value": [1, 2, 1, 1, 1, 1, 1, 2]}))
    
    fig.show()
vestland
  • 55,229
  • 37
  • 187
  • 305
Stücke
  • 868
  • 3
  • 14
  • 41

1 Answers1

2

It certainly seems to not be possible. You can edit some text attributes through f['data'][0]['textfont'] like:

sankey.Textfont({
'color': '#2a3f5f', 'family': '"Open Sans", verdana, arial, sans-serif', 'size': 10
})

And as you can see sankey.Textfont has no attribute that can edit the properties of the "shadow". I've tried setting other values for 'family' but the shadow persists no matter what. Another peculiar detail here seems to be that the color can't be changed directly either. Only 'size' and 'family'

vestland
  • 55,229
  • 37
  • 187
  • 305