Here is a workaround to color only the "Group" column while keeping the "Sample size (n)" column in black. You can ensure the color for "Sample size (n)" remains black by specifying it in the txt_gp
argument using fpTxtGp
.
mylabel <- list(
gpar(), # for group
gpar(col = 'black') # for sample size n
)
age.plot <- forestplot(age.data,
labeltext = c(labeltext, numbers),
boxsize = 0.1,
xlog = FALSE,
clip=c(-20,20),
xticks=c(-20,-10,0,10,20),
align=c("l","c","l"),
col = fpColors(text=c('red','blue')),
txt_gp = fpTxtGp(label=mylabel, ticks=gpar(cex=1)))