# Network Plot - R - Modify Col

Having this R statement:

itemsets = apriori(data, parameter=list(support=0.05, confidence=0.5))
plot(itemsets, method="graph",
control=list(type="items"))


How can I change the colour of my plot? I try to insert "col" but don't allows me to do that because I'm getting the following error:

Error in i.parse.plot.params(graph, list(...)) :
Unknown plot parameters: col


thanks

• Hey, welcome to DataScience-SE. Please, mention the error message you're getting. It will help in sorting it out. Cheers! Nov 6 '16 at 8:04
• @AbhishekJaiswal thanks for your comment. I updated the post wit the error :) Yes, I try with "col = "red" " statement Nov 6 '16 at 9:29

Use edgeCol and nodeCol:

library("arulesViz")
data(Groceries)
rules <- apriori(Groceries, parameter=list(support=0.005, confidence=0.5))
plot(rules, method="graph",
control=list(nodeCol="yellow", edgeCol="blue", type="items"))


Okay, try this--

itemsets = apriori(data, parameter=list(support=0.05, confidence=0.5))
plot(itemsets, method="graph",
control=list(type="items", col="red"))


Cheers!

• thanks for your answer. The code runs well but my chart still have the same colour even if I change to green or blue. Do you know why? I'm using RStudio Nov 6 '16 at 9:58