Code:
g.filter(join_month == "2008.03").nodes.color = red
Why doesn't the following work?
g.filter(join_month == "2008.03").nodes.color = #FFFFFF
Do I just have the format of the hexadecimal color wrong?
Code:
g.filter(join_month == "2008.03").nodes.color = red
Why doesn't the following work?
g.filter(join_month == "2008.03").nodes.color = #FFFFFF
Do I just have the format of the hexadecimal color wrong?
Gephi seems to be using Jython as the basis for its Python Interpreter.
You should be able to get your desired result by creating a java.awt.Color
object and passing your hex value to the constructor, like so:
>>> from java.awt import Color
>>> mycolor = Color(0xFFFFFF)
>>> g.filter(join_month == "2008.03").nodes.color = mycolor
According to an example found here it looks like another way to do this is to use Gephi's color
class.:
>>> red = 0xFF
>>> green = 0xFF
>>> blue = 0xFF
>>> g.filter(join_month == "2008.03").nodes.color = color(red, green, blue)