Closed joseberlines closed 3 years ago
Hi @joseberlines, it's awesome that you're writing things like this. Overall I think that this could be very helpful to someone starting out learning how to visualize graphs! Content wise I don't think you've any mistakes, however one really nice improvement to the graphs could be to make the sizes of the edges correspond to the speed of that train connection.
I also have a few practical notes:
Thanks. I will revisit grammar.
Can you give me a hand here?
Hi @joseberlines, ... however one really nice improvement to the graphs could be to make the sizes of the edges correspond to the speed of that train connection.
I think it is a really good idea. Edges thickness proportional to the train speed and stations size proportional to the amount of passengers.
I would love to do that but:
I see in the style file of the Gene graph the following: "width": "mapData(score, 0, 0.006769776522008331, 20, 60)", "height": "mapData(score, 0, 0.006769776522008331, 20, 60)",
So it looks like it is proportional to the score.
Why width and height if they are circles? I would expect a unique parameter like radius.
Can you give me a hint as to which properties to use?
Hey @joseberlines check it out this part of the docs: https://js.cytoscape.org/#getting-started/specifying-basic-options I think it might help, they have a json tweaking edges:
selector: 'edge',
style: {
'width': 3,
'line-color': '#ccc',
'target-arrow-color': '#ccc',
'target-arrow-shape': 'triangle',
'curve-style': 'bezier'
}
Dear @marimeireles & @ianhi,
I have ready a second article: https://joseberlines.medium.com/part-2-learning-graphs-with-ipycytoscape-the-train-rail-net-grows-up-db2daa2f453d
it is yet unlisted. If you have time the coming days can you please have a look and make any comment here before I made it available to everyone?
thanks