How to change colour curves with the iNext package


I am writing to you about the iNext package. I have obtained a rarefaction curve and extrapolation graph for 3 habitats: wooded pasture (WP), forest (F) and unwooded pasture (NWP).

Here is the code:

div_spe_par_habitats <- read.csv("~/Universite/Master/Travail de master/Data/29 sites/Excel/Data_corrigee/div_spe_par_habitats.csv", row.names=1, sep=";")
out <- iNEXT(div_spe_par_habitats, q=c(0, 1, 2), datatype="abundance", endpoint=1034)
ggiNEXT(out, type=1, facet.var="Order.q", color.var="Assemblage")

However, in the context of a report, I would like to respect a colour code in relation to the habitats to be consistent. Wooded pasture should be green, forest brown and unwooded pasture yellow. Ideally, use these colours: "#CC6600", "#99CC00", "#FFFF99".

I can't do this, how do I do it? What code should I use to change these colours? Thanks for your help!


it seems to wrap a ggplot2 chart ; so first thing to try is standard colour scale setting with scale_color_manual ;
the link attached has examples towards the bottom
Create your own discrete scale — scale_manual • ggplot2 (

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.