Skip to content

sankey nodes position #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 19, 2019
Merged

sankey nodes position #189

merged 2 commits into from
Nov 19, 2019

Conversation

Mahdis-z
Copy link
Contributor

@Mahdis-z Mahdis-z commented Nov 11, 2019

@@ -129,6 +132,28 @@ fig.update_layout(
fig.show()
```

### Define Node Position

The following axample sets [node.x](https://plot.ly/python/reference/#sankey-node-x) and [node.y](https://plot.ly/python/reference/#sankey-node-y) to place nodes in the specified locations, except in the [snap arrangement](https://plot.ly/python/reference/#sankey-arrangement) to avoid overlapping of the nodes, therefore, an automatic snapping of elements will be set to define the padding between nodes via [nodepad](https://plot.ly/python/reference/#sankey-node-pad). The other possible arrangements are:<font color='blue'> 1)</font> perpendicular <font color='blue'>2)</font> freeform <font color='blue'>3)</font> fixed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: example

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the default value of arrangement?

Copy link

@antoinerg antoinerg Nov 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @antoinerg !

"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},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment before this line "pad is given in number of pixels"

@emmanuelle
Copy link
Contributor

💃 thanks!

@Mahdis-z Mahdis-z merged commit 5f6327b into master Nov 19, 2019
@Mahdis-z Mahdis-z deleted the sankey_node_position branch November 19, 2019 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sankey diagram default node positions
3 participants