[R] opacity under dispersion command under plotrix

Joe King jp at joepking.com
Fri Oct 30 20:49:01 CET 2009


Heres my code:

era1 <- seq(1.5,5,.25)
plot(era1,yhyp1$pe, xlab="ERA", ylab="Probability of Winning Cy
Young",type="l", col="black", lwd=2)
dispersion(era1,yhyp1$pe,y1upper,y1lower,type="l",
fill="blue",arrow.cap=0.01,intervals=FALSE)#Requres plotrix
dispersion(era1,yhyp2$pe,y2upper,y2lower,type="l",
fill="lightcyan",arrow.cap=0.01,intervals=FALSE)#Requres plotrix
dispersion(era1,yhyp3$pe,y3upper,y3lower,type="l",
fill="gray97",arrow.cap=0.01,intervals=FALSE)#Requres plotrix
lines(era1,yhyp1$pe,col="black", lwd=5)
lines(era1,yhyp2$pe,col="blue", lwd=5)
lines(era1,yhyp3$pe,col="red", lwd=5)

my raw data is too much to add as I have coefficients from a model run and a
lot of code before that but the matricies for the above variables I am
trying to plot are
> yhyp1$pe
 [1] 0.91938328 0.88005171 0.82235810 0.74124787 0.63520716 0.51090516
 [7] 0.38417025 0.27254070 0.18569395 0.12375682 0.08183003 0.05420338
[13] 0.03619331 0.02446051 0.01677548

> yhyp1$upper
         [,1]
up 0.98470376
up 0.96729674
up 0.93342185
up 0.87016432
up 0.77356024
up 0.63337489
up 0.49704477
up 0.39523107
up 0.32380653
up 0.26340188
up 0.21370693
up 0.17113476
up 0.13810301
up 0.11119516
up 0.08930777

> yhyp1$lower
           [,1]
low 0.758338075
low 0.704684752
low 0.636448570
low 0.569633622
low 0.485986148
low 0.390656111
low 0.276924551
low 0.169273771
low 0.092501362
low 0.048176412
low 0.023014862
low 0.010788438
low 0.005082446
low 0.002250877
low 0.001063545

Please forgive my poor posting manners.

Joe King
206-913-2912
jp at joepking.com
"Never throughout history has a man who lived a life of ease left a name
worth remembering." --Theodore Roosevelt


-----Original Message-----
From: David Winsemius [mailto:dwinsemius at comcast.net] 
Sent: Friday, October 30, 2009 7:15 AM
To: Joe King
Cc: r-help at r-project.org
Subject: Re: [R] opacity under dispersion command under plotrix


On Oct 30, 2009, at 7:02 AM, Joe King wrote:

> Is there anyway to make the lines in the dispersion command come  
> forward in
> a plot and allow the fill in the dispersion parameter be transparent  
> so all
> of the lines I am using to note confidence intervals are shown?

Got code?

> -------------------------------------------
>
> Joe King, M.A.
>
> Ph.D. Student

-- 

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list