1

I'm using python with plotly to create a Sankey Diagram. I've attached an image below that shows how the subtitle text overlaps with the Sankey Diagram- which I don't want. Is it possible to create more white space between the two? I've tried adding "height=#' to the 'layout' part of the code but that just changes the width of my Sankey Diagram.

line2="From time: "+str(time_from)+" to time: "+str(time_to)
line3="\nDATA 1:"+"{:.4f}".format(pue)
line4="\nDATA 2 :"+"{:.4f}".format(ere)

layout =  dict(
        title = 'TITLE HERE'+ '<br>' + '<span style="font-size: 12px;">'+line2+'</span>' + '<br>' + '<span style="font-size: 12px;">'+line3+'</span>' + '<br>' + '<span style="font-size: 12px;">'+line4+'</span>',)

Also, my Sankey Diagram code set up is similar to the answer to this stack overflow question: Plotly Sankey diagram group label and color

enter image description here

carsof
  • 83
  • 1
  • 8
  • 1
    It's a bit of a hack, but for me, usually appending multiple newlines to the title solves the problem quickly. – Captain Trojan Jun 16 '21 at 21:36
  • Thanks for the response! I tried that already but didn't work :/ – carsof Jun 16 '21 at 21:41
  • In that case, sorry, I've never used `plotly` in my life :( – Captain Trojan Jun 16 '21 at 21:44
  • Does this answer your question? [How to add more space between title and Sankey Diagram?](https://stackoverflow.com/questions/68008606/how-to-add-more-space-between-title-and-sankey-diagram) – JeffUK Jun 17 '21 at 08:22
  • Is this an exact duplicate of https://stackoverflow.com/questions/68008606/how-to-add-more-space-between-title-and-sankey-diagram ? Could you delete this one as the other has answers? thanks. – JeffUK Jun 17 '21 at 08:22

0 Answers0