Skip to content
Prev 305147 / 398506 Next

how to create a segplot in black and white?

Hello,

Try the following.


#---------- this is new
colfun <- colorRampPalette(c("black", "white"))
cols <- colfun(nrow(dfInOutBiom2))
#---------- end

plotBiomRatio2 <- segplot(
     reorder(factor(Species), ratioBiomass) ~ (-SEratio  ) + SEratio,
     data =  dfInOutBiom2,
     #-------------- this changed
     col = cols,
     level = NULL,
     colorkey = list(col = cols),
     #-------------- end
     draw.bands = FALSE,
     centers = ratioBiomass,
     ends = "both",
     xlim = range(-SEratio + 0.5, SEratio + 0.5),
     scales = list(cex=1.2, x=list(tck = -1), y=list(font = 3, tck = -1)),
     cex = 1.2,
     xlab = list(font=2, cex=1.2),
     ylab = list(font=2, cex=1.2),
     pch = c(1,1,19,19,1,19,19,19,19,1,19,19,1,1,1,1),
     lwd = 3,
     panel = function(...){
         panel.abline(v = 1, lty = 3, lwd=2)
         panel.segplot(...)
     })
plotBiomRatio2

Hope this helps,

Rui Barradas

Em 10-09-2012 17:59, barbara costa escreveu: