Skip to content
Prev 381464 / 398502 Next

Change colour ggiNEXT plot package iNEXT

Apparently, the iNEXT package was first described in an academic paper
published in 2016, although CRAN archives go back to 2015.
http://chao.stat.nthu.edu.tw/wordpress/paper/120_pdf_appendix.pdf
https://cran.r-project.org/src/contrib/Archive/iNEXT/

The vignette below has a section entitled "General Customization"
which talks about color. See the four lines of code I've added to the
vignette's code to get a general idea what to do.
https://cran.r-project.org/web/packages/iNEXT/vignettes/Introduction.html

library(iNEXT)
library(ggplot2)
library(gridExtra)
library(grid)
data("spider")
out <- iNEXT(spider, q=0, datatype="abundance")
g <- ggiNEXT(out, type=1, color.var = "site")
print(g)
g1 <- g + scale_colour_manual(values=c("yellow", "green"))
print(g1)
g2 <- g1 + scale_fill_manual(values=c("yellow", "green"))
print(g2)

HTH, Bill.

W. Michels, Ph.D.
On Wed, Oct 23, 2019 at 11:13 AM David Winsemius <dwinsemius at comcast.net> wrote: