[adegenet-commits] r419 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Jun 21 19:12:08 CEST 2009
Author: jombart
Date: 2009-06-21 19:12:08 +0200 (Sun, 21 Jun 2009)
New Revision: 419
Modified:
pkg/R/seqTrack.R
Log:
Final fixes.
Modified: pkg/R/seqTrack.R
===================================================================
--- pkg/R/seqTrack.R 2009-06-21 16:55:31 UTC (rev 418)
+++ pkg/R/seqTrack.R 2009-06-21 17:12:08 UTC (rev 419)
@@ -139,8 +139,7 @@
################
plotSeqTrack <- function(x, xy, useArrows=TRUE, annot=TRUE, labels=NULL, dateRange=NULL,
col=NULL, bg="grey", add=FALSE, quiet=FALSE,
- support=NULL, thres=0.5,
- plot=TRUE,...){
+ support=NULL, thres=0.5, col.pal=heat.colors, plot=TRUE,...){
## CHECKS ##
if(!inherits(x,"seqTrack")) stop("x is not a seqTrack object")
@@ -161,6 +160,13 @@
col <- rep(col,length=nrow(x))
}
+ ## HANDLE COLOR PALETTE
+ if(!is.null(col) | !is.null(support)){ # use palette iff col or support provided
+ opal <- palette()
+ on.exit(palette(opal))
+ palette(col.pal(100))
+ }
+
## DEFAULT LABELS
if(is.null(labels)){
labels <- rownames(x)
More information about the adegenet-commits
mailing list