-
Notifications
You must be signed in to change notification settings - Fork 89
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
Formating Node Labels/Titles #71
Comments
Hi Akshat, Thanks for getting in touch. floWeaver uses ipysankeywidget to draw the Sankey diagrams, so you can adjust the styling as shown in the examples there (see the bit about CSS in this section). You could try a cell like this:
I'm not sure exactly what you mean here. It should be possible to hide the title by passing |
Hi Rick, Thank you so much for your help with the font size issue. To hide the node titles, currently I am using the following method: =================================================================== nodes = { nodes['Level2'].partition = Level_2 =================================================================== For now I am defining groups in the partition.simple with titles as ''; however since the nodes with the same titles are grouped, therefore I will have to add the number of spaces within the title definition (because I wish to keep consumer_2 and direct_deliveries_tf_2 separate in the Sankey, the former is defined as '' whereas the latter as '_'). This is not very suitable because I will have to define titles with a different number of spaces for around 50-60 nodes. If there is a particular syntax to define the title in the ProcessGroup definition, I would really appreciate your help with the same. Thank you so much again! P.S. I saw that it is possible to define the title and style (shown below) but I am could not figure out how to use it within the framework of floweaver. |
I see -- no, at the moment there's no way to separate the id of the partition group (which must be unique, hence the multiple spaces) from the title displayed on the Sankey diagram. We should update the Partition code to make this possible. A workaround might be to use multiple ProcessGroups? Level_2 = Partition.Simple('process', [('',['consumer_2']),
'MSW_collection_CHPhigh_2', 'MSW_collection_CHPlow_2',
'MSW_collection_DH_2','MSW_collection_EP_2',
'MSW_collection_PS_2', (' ',['direct_deliveries_tf_2']) ])
nodes = {
'Level2_consumer': ProcessGroup(['consumer_2'], title=''),
'Level2_direct_deliveries': ProcessGroup(['direct_deliveries_tf_2'], title=''),
'Level2': ProcessGroup(['MSW_collection_CHPhigh_2', 'MSW_collection_CHPlow_2',
'MSW_collection_DH_2','MSW_collection_EP_2',
'MSW_collection_PS_2'],
partition=Level_2)
} You would need to replace every Bundle(..., 'Level2'), with Bundle(..., 'Level2_consumer'),
Bundle(..., 'Level2_direct_deliveries'),
Bundle(..., 'Level2'), and vice versa for the flows leaving Level2. |
Yes, I know using multiple ProcessGroups is an option; in fact, that was present code in the originally. However, then the number of bundles will became too large to manage and connect. So we decided to go ahead with the multiple spaces option. Thank you again for your help though :) |
Hi,
I am currently trying to use FloWeaver for mapping waste flows at a macroscopic level:
I have to incorporate many more flows in this Sankey and I was hoping to somehow increase the font size of the node labels if that is possible?
Additionally, since some nodes have been created just for the purpose of formatting, is it possible to hide/suppress the node labels without defining the nodes as waypoints (eg: nodes['level2to4_biowaste'] = Waypoint(title=''))?
The text was updated successfully, but these errors were encountered: