I used the R package vegan to check for nestedness in my dataset:
bc_rp <- read.csv("BC_RPc.csv", na.strings = c("","NA"), header=TRUE, check.names = FALSE)
bc_rp
bc <- data.frame(
cell_layer = c("H", "B", "A", "G", "O"),
Np = c(0, 1, 1, 0, 0),
Pn = c(1, 1, 0, 0, 1),
Npn = c(0, 1, 0, 0, 0),
Npnp = c(0, 1, 0, 0, 0),
Pnp = c(1, 0, 0, 0, 0),
Pnpn = c(0, 1, 0, 0, 0)
)
# Renamed the columns to be easier to manipulate and have no special characters
# colnames(hc) <-c('species', 'a','b','c','d','e','f','g')
# Transpose the rows and columns in data.
bc_t <-t(bc)
out_bc_t <- nestedtemp(bc_t)
out_bc_t
#nestedness temperature: 10.24168
#with matrix fill 0.4
plot(out_bc_t, kind="incid")
And this code works as expected to produce a nestedness temperature and a plot.
nestedness temperature: 10.24168
with matrix fill 0.4

However, I, wish I could change the color of the plot to be something other than Red, and add labels for each cell type, and for the categories(np, pn, etc) How would I do this?
A good starting point is the documentation of the function (try
?nestedtemp). Theplotfunction for thenestedtempseems to have argumentcolthat can be used to set the colours, andnamesthat defaults tonames = FALSE, but settingTRUEwould add names (according to documentation at least – I didn't try). If these do not help you, please ask a more detailed question.