Skip to content
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

Coloring nodes in temporal networks #56

Open
cirillodavide opened this issue Jul 7, 2020 · 1 comment
Open

Coloring nodes in temporal networks #56

cirillodavide opened this issue Jul 7, 2020 · 1 comment

Comments

@cirillodavide
Copy link

It seems that coloring nodes is allowed only for simple networks but not for temporal networks.

n = pp.Network()
n.add_edge('a', 'b')
n.add_edge('b', 'a')
n.add_edge('a', 'c')
n.add_edge('b', 'c')
n.add_edge('c', 'd')
n.add_edge('d', 'c')

style = {
    'node_color' : {'a': '#000000'}
}

pp.visualisation.plot(n, **style)

Capture1

n = pp.TemporalNetwork()
n.add_edge('a', 'b',1)
n.add_edge('b', 'a',1)
n.add_edge('a', 'c',2)
n.add_edge('b', 'c',2)
n.add_edge('c', 'd',3)
n.add_edge('d', 'c',4)

style = {
    'node_color' : {'a': '#000000'}
}

pp.visualisation.plot(n, **style)

Capture2

@IngoScholtes
Copy link
Contributor

Thanks for the issue report!

Yes, we are actually working on that and there is already a working prototype of pathpy3 that has this and many other cool features. Essentially, in pathpy3 you can add arbitrary properties to networks, nodes, and links and in temporal networks those properties are also animated. Also, apart from JS-based animations you can generate high-quality tikz and PDF visualizations with many powerful styling options (powered by network2tikz).

If you want to give it a try, just contact us. We can help you to get started.

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

No branches or pull requests

2 participants