[Seqinr-commits] r1645 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Sep 6 11:14:14 CEST 2009
Author: lobry
Date: 2009-09-06 11:14:12 +0200 (Sun, 06 Sep 2009)
New Revision: 1645
Modified:
pkg/man/col2alpha.Rd
Log:
new example
Modified: pkg/man/col2alpha.Rd
===================================================================
--- pkg/man/col2alpha.Rd 2009-09-05 19:11:14 UTC (rev 1644)
+++ pkg/man/col2alpha.Rd 2009-09-06 09:14:12 UTC (rev 1645)
@@ -17,6 +17,9 @@
\author{J.R. Lobry}
\seealso{\code{\link{colors}}, \code{\link{col2rgb}}, \code{\link{rgb}}.}
\examples{
+#
+# Need alpha transparency channel
+#
par(mar = c(0, 0, 2, 2)+0.1, oma = c(0, 0, 2, 0), mfrow = c(3,2))
for(testcol in c("blue", "red", "green", "yellow", "purple", "darkgreen")){
plot(0,0, type="n", xlim=0:1, ylim = 0:1, axes = FALSE, xlab = "", ylab = "", main = testcol)
@@ -27,5 +30,19 @@
text(i+0.5/n, 0.5, round(i,2), xpd = NA)
}
}
-mtext("Effect of alpha on some colors", side = 3, outer = TRUE)
+mtext("Effect of alpha on some colors\nNote: need alpha transparency channel", side = 3, outer = TRUE)
+#
+# The substractive color scheme:
+#
+par(mar = c(0,0,3,0))
+plot.new()
+plot.window(xlim = c(-1.5, 1.5), ylim = c(-1,1.75), asp = 1)
+n <- 10
+alpha <- 1/n
+for(i in 1:(2*n)){
+ circle(x = -0.5, y = 0, col = col2alpha("yellow", alpha))
+ circle(x = 0.5, y = 0, col = col2alpha("cyan", alpha))
+ circle(x = 0, y = 3/4, col = col2alpha("magenta", alpha))
}
+title("Substractive color scheme\nNote: need alpha transparency channel")
+}
More information about the Seqinr-commits
mailing list