benmaier / netwulf

Interactive visualization of networks based on Ulf Aslak's d3 web app.
MIT License
293 stars 26 forks source link

the config-dict parsed to `visualize` is not respected in the visualization anymore #16

Closed benmaier closed 5 years ago

ulfaslak commented 5 years ago

Probably my doing. Will have a look

benmaier commented 5 years ago

already working on it!

On Apr 11, 2019, at 09:49, Ulf Aslak notifications@github.com wrote:

Probably my doing. Will have a look

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benmaier/netwulf/issues/16#issuecomment-482171118, or mute the thread https://github.com/notifications/unsubscribe-auth/AKOzvPsluWkaBnbZ60Qt7kmF9yz_ks5uks5vf1mBgaJpZM4cp75M.

ulfaslak commented 5 years ago

Oh, no I think it's super simple. I changed some of the names of keys in the config dictionary, because I didn't like the old ones. Maybe that's just the problem?

benmaier commented 5 years ago

ah. However, even "Node size" doesn't work anymore. I think, Reflect.ownKeys is not working properly for some reason.

On Apr 11, 2019, at 09:51, Ulf Aslak notifications@github.com wrote:

Oh, no I think it's super simple. I changed some of the names of keys in the config dictionary, because I didn't like the old ones. Maybe that's just the problem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benmaier/netwulf/issues/16#issuecomment-482171949, or mute the thread https://github.com/notifications/unsubscribe-auth/AKOzvOxrdCTLFZHxmu5UJKlmZMmS_3tyks5vf1n7gaJpZM4cp75M.

benmaier commented 5 years ago

wth. it seems like "Path to file" is the only "ownProperty" that the config dictionary has... that's super weird.

On Apr 11, 2019, at 09:52, Benjamin Maier benjaminfrankmaier@gmail.com wrote:

ah. However, even "Node size" doesn't work anymore. I think, Reflect.ownKeys is not working properly for some reason.

On Apr 11, 2019, at 09:51, Ulf Aslak <notifications@github.com mailto:notifications@github.com> wrote:

Oh, no I think it's super simple. I changed some of the names of keys in the config dictionary, because I didn't like the old ones. Maybe that's just the problem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benmaier/netwulf/issues/16#issuecomment-482171949, or mute the thread https://github.com/notifications/unsubscribe-auth/AKOzvOxrdCTLFZHxmu5UJKlmZMmS_3tyks5vf1n7gaJpZM4cp75M.

ulfaslak commented 5 years ago

Is the change I made to parse_options.js reflected in the version of the webapp that netwulf is using? Check out https://github.com/ulfaslak/network_styling_with_d3/blob/master/parse_options.js

ulfaslak commented 5 years ago

I made that change because I needed the thing to work if you only input data (and not config)

benmaier commented 5 years ago

yes

On Apr 11, 2019, at 10:08, Ulf Aslak notifications@github.com wrote:

Is the change I made to parse_options.js reflected in the version of the webapp that netwulf is using? Check out https://github.com/ulfaslak/network_styling_with_d3/blob/master/parse_options.js https://github.com/ulfaslak/network_styling_with_d3/blob/master/parse_options.js — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benmaier/netwulf/issues/16#issuecomment-482178583, or mute the thread https://github.com/notifications/unsubscribe-auth/AKOzvOFH7wKJT0qPsk1cmxcIoaOcpQr3ks5vf13ygaJpZM4cp75M.

benmaier commented 5 years ago

makes sense.

On Apr 11, 2019, at 10:08, Ulf Aslak notifications@github.com wrote:

I made that change because I needed the thing to work if you only input data (and not config)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benmaier/netwulf/issues/16#issuecomment-482178725, or mute the thread https://github.com/notifications/unsubscribe-auth/AKOzvJbdWAliatQTUQCUbLhoQbB150WYks5vf14KgaJpZM4cp75M.

ulfaslak commented 5 years ago

I can't reproduce :/

benmaier commented 5 years ago

so if you for instance start it with config={'Node size':100} the nodes are huge?

ulfaslak commented 5 years ago

Ah you're right it doesn't work for me too.

ulfaslak commented 5 years ago

Nono it works, just use 'Size' instead of 'Node size'. I changed that. It was more intuitive to call it that as it was already under the "Node" tab.

benmaier commented 5 years ago

Apparently, I was behind 1 commit :( . It still does not work for me, though.

also, I agree that the new names make sense for the GUI, but for the Python config, they're relatively non-descriptive now. Consider

visualize(G, config={'Size': 10, 'Color': '#000000'})

size refers to the nodes but color refers to the links. I think this is pretty unintuitive.

benmaier commented 5 years ago

I'll check in the evening what's going wrong with Reflect.ownKeys on my machine. annoys me to no end :(

ulfaslak commented 5 years ago

This is technical debt. Really we should have generic names for each parameter and then print something different in the visualization. I'll make an issue for this and solve it soon.

benmaier commented 5 years ago

yeah you're right, this would be the proper way. Thanks :)

benmaier commented 5 years ago

works now!!! thanks, ulf!