Change node colours

Hi,
I would like to modify the colours and the shape of the nodes in an igraph network according to party and gender respectively.

The name of the party and the gender is specified in the nodes csv file.
Twitter_handle party Gender State
1 ChuckGrassley Republican Male IA
2 DavidVitter Republican Male LA
3 JeffFlake Republican Male AZ
4 JerryMoran Republican Male KS
5 JohnBoozman Republican Male AR
6 LisaMurkowski Republican Female AK
Can someone please tell me which coding to use?
Is there a format to combine if else function in igraph for this?
Thank you

@rain1234 Please do provide a reprex.

But I think there is already a great guide on what you're trying to achieve here. If you scroll to the bottom of that guide, you'll be able to find a 'how to' on multi color nodes :slight_smile:

I hope that helps.

p.s. reading resources is the best way!

1 Like

Thank you so much. I will refer to the source.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.