More Colors!

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
User avatar
WeezyF
Posts:48
Joined:03 May 2012 02:29
[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
More Colors!

Post by WeezyF » 10 Oct 2013 00:23

Hello all;

I am currently working on a project in which I am taking a digital photograph of a painting, and mapping its pixels based on their colors. I was wondering if there was a way to color a node based on the value in its cell. Ideally, it would be just like how you can size the nodes based on their properties, but just for color. For example, set the Hue of the color based on the "hue" value in my data file. Any thoughts? Thanks!!! zzz


So far, my data looks like this.
x-pos,y-pos,hexColor,hue,sat,brightness
0,0,173630,119,146,54
1,0,0C3F30,115,206,63
2,0,054433,116,236,68
3,0,03432B,111,243,67
4,0,0D4431,112,206,68
5,0,173C34,118,157,60
6,0,08442B,109,225,68
7,0,0A492C,107,220,73
8,0,0C402A,109,207,64
9,0,044B2D,109,241,75
10,0,0E4A30,109,206,74

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: More Colors!

Post by seinecle » 14 Oct 2013 07:54

Hi!!

With Gephi you can only set RGB values of the color of a node. I am no color theorist but I suspect this only partially controls for hue?
You can set these RGB values manually from the Gephi UI, or choose to code these values in a gexf file (see the gexf specs at http://www.gexf.net) that you then import into Gephi.

Best,

Clement
PS: cool project!

francis_flavin
Posts:68
Joined:21 Jan 2012 18:34
Location:Washington, DC, USA
[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: More Colors!

Post by francis_flavin » 21 Oct 2013 20:28

There is a plug-in for the Data Library that will help you. You can find it here:

https://marketplace.gephi.org/plugin/recast-column/

Once you install it, if you go to the "More Actions" menu button, you'll see a couple of options in the "Group 3" category called "Recast column," "Get standart," and "Set standart."

This plug-in is enormously valuable because it allows you use Gephi tools to capture node colors and 3-space RGB coordinates in a layout by using the "Get standart" function. (If you're interested, you can generate your own color values or 3-space coordinate values using your own tools or algorithms and then, using "Set standart," you can make Gephi recognize them.) Also, if you already have the hexcode for the colors in RGB space, just preface them with a "#" and you can use the "Set standart" function to load the values of the nodes' hexcodes into the node's color field.

As Clement points out, you could code a .gefx file to do this. It seems like it might be a straightforward import from a .csv file.

Good luck on your very clever and creative project!

Francis

twoixa
Posts:2
Joined:23 Oct 2014 16:25
[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: More Colors!

Post by twoixa » 23 Oct 2014 16:33

Hi!

Maybe you could give a hand. I am finding a problem to color my nodes. I have the "color to nodes" plug-in, I am importing my .csv with an attribute for my nodes "color" as e.g. #FF00FF . However it doesn't work. I am wondering if it is because is set as string by default when importing.

Also I have download the plug-in you said before the recast column...

Do you have any idea what could be the problem?

Many thanks for your help!

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: More Colors!

Post by seinecle » 23 Oct 2014 16:45

Hi,
Weird. There must be some basic mistake here. If you send me a sample of the file I should be able to find the issue.

twoixa
Posts:2
Joined:23 Oct 2014 16:25
[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: More Colors!

Post by twoixa » 23 Oct 2014 16:53

Hi thanks!!

Do you mean my nodes .csv file? sure, where should I send it?

Best,
isabel

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: More Colors!

Post by seinecle » 23 Oct 2014 17:00


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