Skip to content

Commit 3c2188c

Browse files
committed
Save and restore 'par' values
1 parent 4202a41 commit 3c2188c

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

R/ds.contourPlot.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ ds.contourPlot <- function(x=NULL, y=NULL, type='combine', show='all', numints=2
120120
stop("y=NULL. Please provide the names of two numeric vectors!", call.=FALSE)
121121
}
122122

123+
# Save par and setup reseting of par values
124+
old_par <- par(no.readonly = TRUE)
125+
on.exit(par(old_par), add = TRUE)
126+
123127
# check if the input objects are defined in all the studies
124128
isDefined(datasources, x)
125129
isDefined(datasources, y)

R/ds.heatmapPlot.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ ds.heatmapPlot <- function(x=NULL, y=NULL, type="combine", show="all", numints=2
169169
stop("y=NULL. Please provide the names of the 2nd numeric vector!", call.=FALSE)
170170
}
171171

172+
# Save par and setup reseting of par values
173+
old_par <- par(no.readonly = TRUE)
174+
on.exit(par(old_par), add = TRUE)
175+
172176
# check if the input objects are defined in all the studies
173177
isDefined(datasources, x)
174178
isDefined(datasources, y)

R/ds.histogram.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ ds.histogram <- function(x=NULL, type="split", num.breaks=10, method="smallCells
167167
stop("Please provide the name of the input vector!", call.=FALSE)
168168
}
169169

170+
# Save par and setup reseting of par values
171+
old_par <- par(no.readonly = TRUE)
172+
on.exit(par(old_par), add = TRUE)
173+
170174
# check if the input object is defined in all the studies
171175
isDefined(datasources, x)
172176

R/ds.scatterPlot.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ ds.scatterPlot <- function(x=NULL, y=NULL, method='deterministic', k=3, noise=0.
147147
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
148148
}
149149

150+
# Save par and setup reseting of par values
151+
old_par <- par(no.readonly = TRUE)
152+
on.exit(par(old_par), add = TRUE)
153+
150154
# check if the input objects are defined in all the studies
151155
isDefined(datasources, x)
152156
isDefined(datasources, y)

0 commit comments

Comments
 (0)