[TODO] Color control

Visual manipulations and refinements
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
happyconch
Posts:6
Joined:15 Jun 2011 15: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
[TODO] Color control

Post by happyconch » 15 Jun 2011 15:47

I would like to map an ontology (expressed by attributes in the gexf file) to a set of colors and shapes. This mapping needs to be stable so I can keep the same ontology mapping across projects.
If I code this mapping into viz attributes in the gexf file, I can indeed see the right colors after loading the file. But the mapping will be wiped out if I use any other ranking or partition rationale. IMO, this should be loaded as a VizMap, and I should be able to play with different VizMaps in the same session.
If I go through the pain of editing the nodes again through the data laboratory, the mapping will not be persistent either.
My ontology is also loaded and I can get a partition, but the colors are random. I can adjust a bit the random choices, but they will be randomized again if I change the display.
Am I missing something?
Thanks

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Color control

Post by admin » 15 Jun 2011 16:56

Hi,

You can use workspaces to keep the original copy of the graph and try different color mappings.

Go to the menu "Workspace > Duplicate" to duplicate the current graph.

happyconch
Posts:6
Joined:15 Jun 2011 15: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: Color control

Post by happyconch » 16 Jun 2011 15:40

Thanks. This is a good workaround. I guess I have to forget the way I've been working with Cytoscape...
What I'm typically doing is using first an ontology-driven color coding to analyze affiliation patterns (user / topic thread). Then I extract users to check positions and roles, and I need a centrality-driven coding for that. Finally I analyze affiliations to topics and influence, and I might use different partitions to show specialization + influence. All along, I might have to adjust the graphs to better position key hubs or aggregates of topics. This is where a frozen network is a constraint: If I filter users, I can use a different workspace like you suggested, and then use a centrality-driven color coding, but I can't redraw that graph and then get back to the ontology-driven color coding, because that coding is gone for that workspace. I have no way to reapply my own color-coding.
If the vizmap coding -and especially if I took the pain to code it inside my file- cannot be considered as an object of its own, I believe that this is a weakness. I would prefer to keep the liberty of combining any color/shape coding at will: my initial coding, or any random partition coding which I would like to freeze, save, reimport, etc.
I'm sure this is cooking somewhere... In any case, Gephi is hands down the best SNA tool on the market today and I'm grateful for the fantastic work the Gephi team has achieved.

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Color control

Post by admin » 16 Jun 2011 15:55

Hmm we might find a way to keep your color coding if we display the color column in the Data Laboratory. You would then be able to duplicate this column to reverse your changes afterward.

Eduardo, what do you think about that? We could have this column hidden by default, as well as for the node coordinates?

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: Color control

Post by eduramiba » 16 Jun 2011 16:07

Hi,
The only problem is that node/edge color is not a column but a property of the object's properties like size and position.

Other approach that would not need big changes could be to have some data laboratory utilities to copy these properties to a new column and do the opposite (use some column to set nodes colors for example)

Eduardo

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Color control

Post by admin » 16 Jun 2011 16:21

Is there a way to have a transparent mechanism for the end-user?

When the user activates the "column" display, the properties are copied in a new column named "color".
When the user edits one value, the change is transmitted to the property.
When the user hides this column, the column is destroyed.

But the tricky thing will be to update the column when the property is changed.

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Color control

Post by elijah » 16 Jun 2011 21:26

admin wrote:Hmm we might find a way to keep your color coding if we display the color column in the Data Laboratory. You would then be able to duplicate this column to reverse your changes afterward.

Eduardo, what do you think about that? We could have this column hidden by default, as well as for the node coordinates?
This is a good idea, in general. I'd like to store color and size attributes in traditional columns and be able to assign them, that way I can build my legend outside Gephi and maintain its consistency in multiple applications.

happyconch
Posts:6
Joined:15 Jun 2011 15: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: Color control

Post by happyconch » 16 Jun 2011 22:43

Exactly, and shape would be another obvious candidate.

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