From d311733c45526f6fe6b5459ffc37d2bbb15f6eae Mon Sep 17 00:00:00 2001 From: ranke Date: Mon, 28 Aug 2006 16:11:37 +0000 Subject: 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 --- DESCRIPTION | 2 +- R/drplot.R | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b78e243..eccc47a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: drfit -Version: 0.05-85 +Version: 0.05-86 Date: 2006-08-28 Title: Dose-response data evaluation Author: Johannes Ranke diff --git a/R/drplot.R b/R/drplot.R index 85e174f..3573fd9 100644 --- a/R/drplot.R +++ b/R/drplot.R @@ -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) -- cgit v1.2.1