[R] transparency in segments()
David Winsemius
dwinsemius at comcast.net
Fri Jan 11 02:17:59 CET 2013
On Jan 10, 2013, at 1:29 PM, Robert Pazur wrote:
> 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?
Try this:
?colors
>
> 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]]
>
> _
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list