Closed uta-connolly closed 1 year ago
Please see below:
library("qgraph")
graph1 <- matrix(rnorm(4^2),4,4)
graph2 <- matrix(rnorm(4^2),4,4)
library("ggplot2")
centralityPlot(list(male = graph1, female = graph2)) +
scale_colour_discrete("gender")
I’m looking for documentation on how to use centralityPlot() in which the first argument is a list. The function works and plots the results for all lists on the same graph which is what I want. However, the default legend distinguishes the list elements as “type 1” and “type2,” etc. I would like to change this, e.g., to “male” and "female”. Is there a way of doing this?