Enhancing SquareNodes with text

Please use a mailing-list, see http://gephi.org/developers/
Post Reply [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
VoidRay
Posts:5
Joined:13 Jan 2013 17:21
[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
Enhancing SquareNodes with text

Post by VoidRay » 14 Jan 2013 03:55

So, I need to enhance the square node to be able to contain colored text as well as a number of other things reactive to the mouse input.

I'm following the example here: http://wiki.gephi.org/index.php/HowTo_w ... w_renderer
and using this: https://github.com/gephi/gephi-plugins-bootcamp

as a starting point. Problem is, NetBeans doesn't find any javadocs for PGraphics objects. I had to go find it here:
http://processing.googlecode.com/svn/tr ... sing/core/

And even when I cast it to a PGraphicsJava2D object, I still don't find a straight forward way to write text into it.

http://processing.googlecode.com/svn/tr ... ava2D.html


Essentially, I want my nodes to be responsive to mouseover, with small summaries of data on them when the mouse is not over them. How do I essentially embed a small JPanel (its what I'm familiar with, I'm watching some of the netbeans stuff, but its hard to understand-I know there's a TopLevelComponent) for each node? Maybe that doesn't sound lightweight at all, I agree, someone point me in the right direction-I want to have data displayed for each node, preferably if it was a sort of rectangular table of information that you could look over when you mouse over, and still hold maybe 2-4 short strings in it, when the mouse is not over it.

VoidRay
Posts:5
Joined:13 Jan 2013 17:21
[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: Enhancing SquareNodes with text

Post by VoidRay » 15 Jan 2013 08:45

I was really hoping that I could make a combination of graphviz's node appearance (specifically this one: http://www.graphviz.org/content/psg) and dynamic mouse over capability, like I talked about that will give additional information. Also, I notice that in gephi itself, you can click and move individual nodes-this is proof that you can interact with the graph-I know what I need can be done, I just need to find out how to do it.

As you can see in the graphviz image, each node can contain arbitrary text within a box, and the space calculation given to it depends on the size of the node. I also like how graphviz does a good job of spacing them out, and giving them an overall direction as well.

I know maybe what I asked probably sounds dumb at first, on account of the fact that you can just turn on labels., but labels don't cause the spaces to change. I really don't like it when labels and edges in graphviz overlap, and I want my graph results to look a little bit more like what graphviz has in that image. Gephi's live animation and manupulation capability as well as modular format and file export capability is exactly why I want to work with the toolkit, but the PreviewJFrame in the ToolkitDemos example is so clumped together that I can't see how I would ever discern anything in the graph.

So I should revise this: this is a combination Node Render change and __later__ layout creation (later some animation and query capability).

I want people to be interested in what I'm doing, so I'll explain:

I'm recording execution with dynamic binary instrumentation. While an arbitrary program is running, I have my pintool collecting information and it does some on-line analysis to collect enough information about what can be learned about feasibly, without excessive overhead-things like the instruction, the data that was moved, the type of operation, where the instruction occurred, and what data was overwritten (if any) and much more. All of this information is written to a file, which can then be used for offline analysis in combination with a process dump (taken when the program starts).

So this is where gephi comes in-I want to use gephi-toolkit to write a dynamic depiction of what happened at what moment in execution using the file that was created. Without node rendering change (in combination with a layout change), the current depiction is untenable. I see that there is a plugin (https://gephi.org/plugins/noverlap/) that provides the also-needed no overlapping capability, but I also note that it specifically mentions that it is for the round nodes-and I wonder how it will affect nodes that are square with information in them will work with this. I see that there is a wiki page that talks about how to retrieve the jar files from the plugin file and that if the module is correctly written and not depending on anything that is within the core or UI modules of gephi itself, that one should be able to link it along with the gephi-toolkit to the classpath of the program you're working with. I haven''t tried this yet.

As far as the layout goes, I agree it should be on another post-I really want to focus on the node change.

Anyway, the conception of the final product is pretty cool: we want to do offline back-tracing on data propagation and use visual tools with animation of execution. Context sensitive state search and diff'ing of execution are also possible here. This is a possible thesis for my masters, and I'm enthusiastic about working on it. (I'm a senior fast track student in Texas working on information security degree). In May 2014 I will graduate with a Masters, and I'm looking to do a design project between now and then.

I really hope that someone can help me with this. Is changing the rendering to suit just these needs within capability? I noticed that there are outlines for a new visualization engine that solves a lot of these problems, and I've looked on the github gephi repo enough to know that there is a branch with that new viz engine on it, and it has a lot of commits, but its also very dated (and so is the documentation). But I really want to be able to use this tool.

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[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: Enhancing SquareNodes with text

Post by eduramiba » 15 Jan 2013 22:57

Hi,
Please check this thread, it will answer many of your questions.

Mouse support for preview is very recent, and available since Gephi 0.8.2. Please note that mouse over events are not supported due to high quality vector graphics. If you can make it right with click events, it would be preferable.
Feel free to report any problem you find with preview mouse events, or improving it if necessary.

About rendering that kind of nodes, you will definitely need to implement your own preview plugin renderer.

Eduardo

Post Reply
[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
[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