[R] Missing text in lattice key legend
Luigi Marongiu
m@rong|u@|u|g| @end|ng |rom gm@||@com
Mon Oct 11 13:46:36 CEST 2021
Hello,
I am drawing some data with lattice using:
```
library(lattice)
COLS = c("gold", "forestgreen", "darkslategray3", "purple")
xyplot(Value ~ Concentration,
group = Substance, data = inf_avg,
pch = 16, cex = 1.2, type = "b",
xlab=expression(bold(paste("Concentration (", mu, "M)"))),
ylab=expression(bold("Infection rate")),
col=COLS,
scales = list(x = list(log = 10, at=c(unique(inf_avg$Concentration))
)
),
key = list(space="top", columns=4, col = "black",
points=list(pch=c(16, 16, 16, 16),
col=COLS,
text=list(c("6-PN", "8-PN", "IX", "XN")
)
)
),
panel = function(x,y) {
panel.xyplot(x,y)
errbar()
}
)
```
It all works but the legend only shows the colored dots, there is no
text. Is it something missing from the syntax?
Thanks
--
Best regards,
Luigi
More information about the R-help
mailing list