Skip to content

Commit

Permalink
filledcontour flexibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dankelley committed Mar 2, 2012
1 parent 83220fa commit 44b4ef3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: oce
Version: 0.8-5
Date: 2012-03-01
Date: 2012-03-02
Title: Analysis of Oceanographic data
Author: Dan Kelley <[email protected]>
Maintainer: Dan Kelley <[email protected]>
Expand Down
18 changes: 12 additions & 6 deletions R/imagep.R
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,12 @@ imagep <- function(x, y, z,
storage.mode(z) <- "double"
plot.new()
plot.window(xlim=xlim, ylim=ylim, xaxs=xaxs, yaxs=yaxs)
## The next line will not be permitted in R past version 14.2; it will
## then become necessary to use a new function ".filled.contour()".
.Internal(filledcontour(as.double(x), as.double(y), z, as.double(breaks), col=col))
## Filled contours became official in version 2.15.0 of R.
if (getRversion() >= "2.15.0") {
.filled.contour(as.double(x), as.double(y), z, as.double(breaks), col=col)
} else {
.Internal(filledcontour(as.double(x), as.double(y), z, as.double(breaks), col=col))
}
mtext(ylab, side=2, line=par('mgp')[1])
} else {
if (!breaksGiven) {
Expand All @@ -284,9 +287,12 @@ imagep <- function(x, y, z,
storage.mode(z) <- "double"
plot.new()
plot.window(xlim=xlim, ylim=ylim, xaxs=xaxs, yaxs=yaxs)
## The next line will not be permitted in R past version 14.2; it will
## then become necessary to use a new function ".filled.contour()".
.Internal(filledcontour(as.double(x), as.double(y), z, as.double(breaks), col=col))
## Filled contours became official in version 2.15.0 of R.
if (getRversion() >= "2.15.0") {
.filled.contour(as.double(x), as.double(y), z, as.double(breaks), col=col)
} else {
.Internal(filledcontour(as.double(x), as.double(y), z, as.double(breaks), col=col))
}
} else {
image(x=x, y=y, z=z, axes=FALSE, xlab=xlab, ylab=ylab, breaks=breaks, col=col,
xlim=xlim, ylim=ylim, ...)
Expand Down

0 comments on commit 44b4ef3

Please sign in to comment.