scaleZoom | R Documentation |
Returns the portion of a matrix based on the specified ranges of abscissa (x) and ordinate (y) values.
scaleZoom(x, y, z=NULL, zoom=NULL, logxy="y", xy.linked=FALSE, xlab="x", ylab="y", log.base=2)
x |
a numeric vector of abscissa values corresponding to the provided |
y |
a numeric vector of ordinate values corresponding to the provided |
log.base |
the base of the logarithm used to scale the output zoomed coordinates. See the help
for the |
logxy |
a character string indicating containing either or both of the characters |
xlab |
character string defining x-label. Default: |
xy.linked |
a logical value. If
Thus, both x- and y-zoom conditions must be met for both coordinates. Default: |
ylab |
character string defining x-label. Default: |
z |
a matrix of numeric values whose x- and y-axis values are defined by the |
zoom |
a four-element numeric vector containing the ranges to zoom into the
data in |
a named list containing the following components:
x |
The zoomed portion of the input |
y |
The zoomed portion of the input |
z |
The zoomed portion of the input |
ix |
The indices of the original |
iy |
The indices of the original |
xlab |
A character string defining an appropriate x-label for the zoomed x-coordinate output. |
ylab |
A character string defining an appropriate y-label for the zoomed y-coordinate output. |
image
, stackPlot
.
## create an image x <- y <- seq(-4*pi, 4*pi, len=50) r <- sqrt(outer(x^2, y^2, "+")) z <- cos(r^2)*exp(-r/6) image(x,y,z,col=gray((0:32)/32)) ## zoom in on one portion of that image and ## re-display zoom <- scaleZoom(x,y,z, zoom=c(-5,5,-1,10), logxy="") image(zoom$x, zoom$y, zoom$z, col=gray((0:32)/32))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.