diff options
author | ranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc> | 2006-08-28 16:11:37 +0000 |
---|---|---|
committer | ranke <ranke@d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc> | 2006-08-28 16:11:37 +0000 |
commit | d311733c45526f6fe6b5459ffc37d2bbb15f6eae (patch) | |
tree | d0af35e694ae59c455316f536e6d7ce0f9423307 /R | |
parent | 53005a97d56b43a7901f91781145acf30f8bf250 (diff) |
Fixed the line types in drplot. Now we get different lines
for different fits (same substance), and plotting for multiple substances
without overlay as needed for drfit-tox works again.
git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/drfit@86 d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc
Diffstat (limited to 'R')
-rw-r--r-- | R/drplot.R | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -193,23 +193,27 @@ drplot <- function(drresults, data, logED50 <- fits[j,"logED50"] mtype <- as.character(fits[j, "mtype"]) if (mtype == "probit") { - lty <- ltys[nl <- nl + 1] + if (overlay) nl <- nl + 1 else nl = j + lty <- ltys[nl] scale <- fits[j,"b"] plot(function(x) pnorm(-x,-logED50,scale),lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty) } if (mtype == "logit") { - lty <- ltys[nl <- nl + 1] + if (overlay) nl <- nl + 1 else nl = j + lty <- ltys[nl] scale <- fits[j,"b"] plot(function(x) plogis(-x,-logED50,scale),lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty) } if (mtype == "weibull") { - lty <- ltys[nl <- nl + 1] + if (overlay) nl <- nl + 1 else nl = j + lty <- ltys[nl] location <- fits[j,"a"] shape <- fits[j,"b"] plot(function(x) pweibull(-x+location,shape),lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty) } if (mtype == "linlogit") { - lty <- ltys[nl <- nl + 1] + if (overlay) nl <- nl + 1 else nl = j + lty <- ltys[nl] plot(function(x) linlogitf(10^x,1,fits[j,"c"],fits[j,"logED50"],fits[j,"b"]), lld - 0.5, lhd + 2, add=TRUE, col=color, lty=lty) |