Hello,
You can use ?rgb to set the transparency level. As an example, with
alpha = 0.5
clr <- c(rgb(1, 0, 0, 0.5), rgb(0, 0, 1, 0.5))
plot(0:1, 0:1, col = clr[1], lwd = 10, type = "l")
lines(0:1, 1:0, col = clr[2], lwd = 10)
Hope this helps,
Rui Barradas
Em 10-01-2013 21:29, Robert Pazur escreveu:
Dear all,
i would like to plot each value from my datasets as segment with defined
transparency
However, I didnt find out how to set the transparency.
definition by "col=" in par() or segments() doesnt seem to work
any suggestions?
Thanks in advance.
Kind regards,
Robert Pazur
example code:
xx2 <-read.table("http://www.scandinavia.sk/data/R/0_05.csv", sep=";",
header=T)
plot(xx2$MEAN_PERI,ylim=c(50,350),xlim=c(1,30000),log= "x",
yaxt='n',ylab="",xlab="mean", type = "n")
segments(xx2$MEAN_PERI, 60,xx2$MEAN_PERI, 100, tcl=-.2)
xx3 <-read.table("http://www.scandinavia.sk/data/R/0_10.csv", sep=";",
header=T)
segments(xx3$MEAN_PERI, 120,xx3$MEAN_PERI, 160, tcl=-.2)
xx4 <-read.table("http://www.scandinavia.sk/data/R/0_15.csv", sep=";",
header=T)
segments(xx4$MEAN_PERI, 180,xx4$MEAN_PERI, 220, tcl=-.2)
xx5 <-read.table("http://www.scandinavia.sk/data/R/0_20.csv", sep=";",
header=T)
segments(xx5$MEAN_PERI, 240,xx5$MEAN_PERI, 280, tcl=-.2)
xx6 <-read.table("http://www.scandinavia.sk/data/R/0_25.csv", sep=";",
header=T)
segments(xx6$MEAN_PERI, 300,xx6$MEAN_PERI, 340, tcl=-.2)
[[alternative HTML version deleted]]
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.