Open ThisIsLorenzo opened 4 months ago
@ThisIsLorenzo
Change
V(bsk.network)$label.color <- adjustcolor("black", min(c(1, alpha + 0.1)))
to
V(bsk.network)$label.color <- adjustcolor("black", max(c(1, alpha + 0.1)))
You should name your function differently from the original code
@lorenzo which file contains this code?
https://github.com/ThisIsLorenzo/PFAS_Systematic_Evidence_Map/blob/53d7033d50d05c2ca87e892a46d18948dacce648/R/analysis_code.Rmd#L4216
@mlagisz
the only thing I changed in the function code is V(bsk.network)$label.color <- adjustcolor("black", min(c(1, alpha + 0.1)))
with V(bsk.network)$label.color <- "black"
.
V(bsk.network)$label.color <- adjustcolor("black", max(c(1, alpha + 0.1)))
Still having the same error: Error in degree(bsk.network, mode = "all") : unused argument (mode = "all")
@itchyshin
SFig.22.pdf
This is how the Fig looks like at the moment. All of this is to bring down alpha
for the network lines so that we can easier read the lables.
@mlagisz - please have a look at @ThisIsLorenzo's issue (too busy to have a look at it right now while teaching)
@itchyshin I am on it! almost there! @ThisIsLorenzo
Note: Cooking dinner while coding is a bad habit... as bad as coding while cooking dinner...
We need to change the function's code to make the label's alpha = 1 while making the network lines' alpha = 0.3. Function's code is available prompting the function's name in the R console.
> networkPlot
Look for the lineV(bsk.network)$label.color <- adjustcolor("black", min(c(1, alpha + 0.1)))
change it withV(bsk.network)$label.color <- "black"
Then, we add the alpha value in the codenetworkPlot(NetMatrix_keywords, normalize = "association", n = 20, Title = "Keyword co-occurrences", type = "fruchterman", size.cex = TRUE, size = 10, remove.multiple = F, edgesize = 3, labelsize = 3, label.cex = TRUE, edges.min = 1, label.n = 30, alpha = 0.3)
However, I get an error when I try to run the revised> networkPlot
function:Error in degree(bsk.network, mode = "all") : unused argument (mode = "all")
I did not change anything else in the function's code.