hi André,
thanks for doing this. i did some testing and data were successfully passed to the non-empty gephi file. nodes were added, deleted, and attributes were updated.
however, it appears now that the Master cannot be started unless the graph is non-empty. that is, starting from a new project and a graph having zero nodes, you cannot start the Master. thinking that the status icon (i.e. the red or green dot to the left of the Master Server item) might not be reporting an accurate status, i did try to create a node via cURL; it reported back "curl(7) couldn't connect to host".
that said, if you create a new file and add a single node, you can then start the Master successfully.
thanks again,
ben
Graph Streaming - URL formatting question
-
- Posts:12
- Joined:12 Jan 2012 23:27
- Location:Ipswich, MA [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Graph Streaming - URL formatting question
just out of curiosity, is there a way to pass x, y, r, g, b attribute values in the json string?
i've tried passing values as both strings and ints and no exceptions are thrown (not sure if they're ignored since other actions like, delete a node that doesn't exist, doesn't throw an exception either). the nodes don't appear in the data table. perhaps i'm just not using the correct attribute names?
thanks again for your help with this.
i've tried passing values as both strings and ints and no exceptions are thrown (not sure if they're ignored since other actions like, delete a node that doesn't exist, doesn't throw an exception either). the nodes don't appear in the data table. perhaps i'm just not using the correct attribute names?
thanks again for your help with this.
Re: Graph Streaming - URL formatting question
Hi ben, there was a mistake in the patch, the correction is in the attached build.
Let me know if it works now.
You should be able to modify the following viz attributes:
x,y,z (integer or double)
r,g,b (doubles between 0 and 1)
color (example: "0xcccccc")
size (integer or double)
Examples of calls using curl:
curl "http://localhost:8080/workspace0?operation=updateGraph" -d "{\"an\":{\"B\":{\"label\":\"Streaming Node B\",\"size\":10}}}"
curl "http://localhost:8080/workspace0?operation=updateGraph" -d "{\"cn\":{\"A\":{\"x\":10,\"y\":10,\"z\":1}}}"
curl "http://localhost:8080/workspace0?operation=updateGraph" -d "{\"cn\":{\"A\":{\"r\":1,\"g\":1,\"b\":0 }}}"
curl "http://localhost:8080/workspace0?operation=updateGraph" -d "{\"cn\":{\"A\":{\"color\":\"0x00ff00\"}}}"
Let me know if it works now.
You should be able to modify the following viz attributes:
x,y,z (integer or double)
r,g,b (doubles between 0 and 1)
color (example: "0xcccccc")
size (integer or double)
Examples of calls using curl:
curl "http://localhost:8080/workspace0?operation=updateGraph" -d "{\"an\":{\"B\":{\"label\":\"Streaming Node B\",\"size\":10}}}"
curl "http://localhost:8080/workspace0?operation=updateGraph" -d "{\"cn\":{\"A\":{\"x\":10,\"y\":10,\"z\":1}}}"
curl "http://localhost:8080/workspace0?operation=updateGraph" -d "{\"cn\":{\"A\":{\"r\":1,\"g\":1,\"b\":0 }}}"
curl "http://localhost:8080/workspace0?operation=updateGraph" -d "{\"cn\":{\"A\":{\"color\":\"0x00ff00\"}}}"
- Attachments
-
- graphstreaming.zip
- (158.86KiB)Downloaded 847 times
-
- Posts:12
- Joined:12 Jan 2012 23:27
- Location:Ipswich, MA [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Graph Streaming - URL formatting question
perfect, thanks André.
i had just figured out the color and coordinates assignments. the syntax seems a little fickle in that passing integers to the x and y properties fails, yet passing floats works. didn't realize it was double values between 1 and 0 for rgb. and i stumbled upon passing a hex code as a string for color; it works, but the Edit panel shows an error for the Color property: "Error getting property value", even though the correct color is assigned to the node. not a big deal for me; again it works
i'll test the update shortly.
ben
i had just figured out the color and coordinates assignments. the syntax seems a little fickle in that passing integers to the x and y properties fails, yet passing floats works. didn't realize it was double values between 1 and 0 for rgb. and i stumbled upon passing a hex code as a string for color; it works, but the Edit panel shows an error for the Color property: "Error getting property value", even though the correct color is assigned to the node. not a big deal for me; again it works

i'll test the update shortly.
ben
-
- Posts:12
- Joined:12 Jan 2012 23:27
- Location:Ipswich, MA [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Graph Streaming - URL formatting question
hi André,
the latest version works with empty graphs. well done.
i also tested your examples above, and in fact, passing integers to the x, y, and z properties doesn't jive. again, no exceptions, but the node is not created. appending a .0 to define the values as floating types works, however.
passing ints to the size property is ok.
also, passing a string hex code to the color property, either upper or lower case works, but the edit panel complains with "Error getting property value", even though the correct color is rendered.
and just to verify, the values 0 through 1 for r,g,b represents the percentage between 0 and 255, correct? i have to remind myself that we're working with pixel light, not actual color.
thanks again,
ben
the latest version works with empty graphs. well done.
i also tested your examples above, and in fact, passing integers to the x, y, and z properties doesn't jive. again, no exceptions, but the node is not created. appending a .0 to define the values as floating types works, however.
passing ints to the size property is ok.
also, passing a string hex code to the color property, either upper or lower case works, but the edit panel complains with "Error getting property value", even though the correct color is rendered.
and just to verify, the values 0 through 1 for r,g,b represents the percentage between 0 and 255, correct? i have to remind myself that we're working with pixel light, not actual color.
thanks again,
ben
Re: Graph Streaming - URL formatting question
hi Ben, thanks for your feedback.
I'll take a look in the other defects you pointed out.
The r,g,b values should be the percentages between 0 and 255.
I'll let you know when the new version will be available.
I'll take a look in the other defects you pointed out.
The r,g,b values should be the percentages between 0 and 255.
I'll let you know when the new version will be available.
- mbastian
- Gephi Architect
- Posts:728
- Joined:10 Dec 2009 10:11
- Location:San Francisco, CA [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Graph Streaming - URL formatting question
That might be unrelated but I think there is a bug in the Visualization Engine which won't draw your streaming graph if you have ONLY nodes. Try adding some random edges if it looks like you hit this issue.
Re: Graph Streaming - URL formatting question
Hi!
About the "Error getting property value" you get when passing a hex code to the color property, I was able to reproduce it and I found a correction.
However, about the problem when passing integers to the x, y, and z properties, I was not able to reproduce it. It is possible that you had hit some bug which was corrected in the main branch (maybe the bug referred by Mathieu in the last message).
About the "Error getting property value" you get when passing a hex code to the color property, I was able to reproduce it and I found a correction.
However, about the problem when passing integers to the x, y, and z properties, I was not able to reproduce it. It is possible that you had hit some bug which was corrected in the main branch (maybe the bug referred by Mathieu in the last message).
-
- Posts:12
- Joined:12 Jan 2012 23:27
- Location:Ipswich, MA [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Graph Streaming - URL formatting question
heya,
thanks for investigating again. i hadn't tested Mathieu's use case since i'm only working with nodes at this point (no pun intended). i'll give it a shot later today.
other than that, things are working fine in respect to rendering. for whatever reason, ints are ignored for coordinates which cause the node to not be added to the graph, but it's not a deal breaker for me (in fact i need to pass doubles).
also... my company is planning on giving you guys a donation in recognition for all your help. again, i really appreciate your assistance and quick turn around with this.
ben
thanks for investigating again. i hadn't tested Mathieu's use case since i'm only working with nodes at this point (no pun intended). i'll give it a shot later today.
other than that, things are working fine in respect to rendering. for whatever reason, ints are ignored for coordinates which cause the node to not be added to the graph, but it's not a deal breaker for me (in fact i need to pass doubles).
also... my company is planning on giving you guys a donation in recognition for all your help. again, i really appreciate your assistance and quick turn around with this.
ben