plotly / plotly.py

The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
https://plotly.com/python/
MIT License
15.98k stars 2.53k forks source link

add label alignment in nodes in Sankey plot #3080

Open Clownshift opened 3 years ago

Clownshift commented 3 years ago

Dear devs,

Recently, I have been playing around with Sankey plots in plotly. This tool is really great. I have been looking for a specific feature that I couldn't find in the API and in fact I believe it does not exist, yet. Would it be possible to specifiy the alignment of the labels in the nodes of a sankey plot? Specifically in vertical orientation, I believe the nodes would look much prettier, if the label may be horizontally aligned with the box.

I would imagine additional keywords for the node-dictionary like "horizontalalignment" and "verticalalignment". (As it is the case for matplotlib textboxes : https://matplotlib.org/3.1.1/tutorials/text/text_props.html)

Possibly, this is actually easily implemented, but I could not really figure out, how to do that myself.

Is it possible to add this feature?

Clownshift commented 3 years ago

May I assume that nobody is interested in having a look at this? Or is this actually already possible, but I only couldn't figure out how? Or is this possibly a duplicate issue?

hyzhak commented 3 years ago

+1 for this feature request. It is really missing functionality. Without it big chats really hard to organize and make them readable.

firstdayofjune commented 2 years ago

@Clownshift, could it be your request duplicates #3004? (Not a plotly dev, just happened to come across both issues.)

Clownshift commented 2 years ago

Actually, yes. Seems to be a duplicate. As far as I understand, "textposition" in #3004 refers to what I mean with "alignment".

@Clownshift, could it be your request duplicates #3004? (Not a plotly dev, just happened to come across both issues.)

auguste-dupin commented 1 year ago

Has anyone found a solution?