From 78400199cd3e00b294cc5b441e150770fc57393d Mon Sep 17 00:00:00 2001 From: ranke Date: Mon, 14 Mar 2005 06:10:41 +0000 Subject: Added the option to leave the graphics file device open in drplot(). git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/drfit@18 d1b72e20-2ee0-0310-a1c4-ad5adbbefcdc --- R/drfit.R | 8 ++++++-- man/drplot.Rd | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/R/drfit.R b/R/drfit.R index 9516180..7ffb1a0 100644 --- a/R/drfit.R +++ b/R/drfit.R @@ -215,7 +215,7 @@ drfit <- function(data, startlogEC50 = NA, chooseone=TRUE, drplot <- function(drresults, data, dtype = "std", alpha = 0.95, path = "./", fileprefix = "drplot", overlay = FALSE, postscript = FALSE, png = FALSE, bw = TRUE, - colors = 1:8) + colors = 1:8,devoff=T) { unitlevels <- levels(as.factor(drresults$unit)) if (length(unitlevels) == 1) { @@ -373,7 +373,11 @@ drplot <- function(drresults, data, dtype = "std", alpha = 0.95, } } if (overlay) legend(lhd - 1, hr + 0.1, dsubstances,lty = 1, col = colors) - if (overlay && (postscript || png)) dev.off() + if (overlay && (postscript || png)) { + if (devoff) { + dev.off() + } + } } checkplate <- function(plate,db="cytotox") diff --git a/man/drplot.Rd b/man/drplot.Rd index 784b65b..c9b1979 100644 --- a/man/drplot.Rd +++ b/man/drplot.Rd @@ -7,7 +7,7 @@ } \usage{ drplot(drresults, data, dtype, alpha, path, fileprefix, overlay, - postscript, png, bw, colors) + postscript, png, bw, colors, devoff) } \arguments{ \item{drresults}{ @@ -62,6 +62,11 @@ \item{colors}{ This is a vector of colors, defaulting to 1:8, used for plotting the data. } + \item{devoff}{ + If set to FALSE, the closing of the device after creation of an overlay png + or postscript graph will be left out, so texts and other elements can be + added to the graph. + } } \value{ \item{results}{ -- cgit v1.2.1