Learn R Programming

sendplot (version 4.0.0)

makeRectDF: Maps R x and y point coordinates to pixil coordinates for tool-tip interactivity

Description

NOT CALLED BY USER. The makeRectDF function is utilized by makeImap to map a set of R x and y coordinates to their corresponding pixil x and y coordinates. It also sets up data.frames of tool-tip information for display purpses

Usage

makeRectDF(Splot,
            xlim, ylim,
            x.left,y.top,
            x.right,y.bottom,
            boundingPt,
            x.labels=NA,
            y.labels=NA,
            xy.labels=NA,
            x.links=NA,
            y.links=NA,
            xy.links=NA,
            asLinks=NA,
            x.images=NA,
            y.images=NA,
            xy.images=NA)

Arguments

Splot
An Object of the class Splot
xlim
x limit of figure
ylim
y limit of figure
x.left
numeric vector of left x values for interactive rectangles
y.top
numeric vector of top y values for interactive rectangles
x.right
numeric vector of right x values for interactive rectangles
y.bottom
numeric vector of bottom y values for interactive rectangles
boundingPt
List with up.left and low.right pixil coordinates of the desired interactive figure's plotting region, as determined by automapPts
x.labels
data frame of n x m which contains values relating to the x axis. n should be the length of the x.left argument. m columns contains information regarding sample. This information is displayed in the interactive plot window
y.labels
data frame of n x m which contains values relating to the y axis. n should be the length of the y.top argument. m columns contains information regarding sample. This information is displayed in the interactive plot window
xy.labels
list of matricies. All matricies should be of n x m where n is the length of x.left and m is the length of y.top. This information is displayed in the interactive plot window
x.links
data frame of n x m which contains web addresses for links relating to the x axis. n should be the length of the x.left argument. m columns contains information regarding sample. This information is displayed as hyperlinks in the interactive p
y.links
data frame of n x m which contains web addresses for links relating to the y axis. n should be the length of the y.top argument. m columns contains information regarding sample. This information is displayed as hyperlinks in the interactive pl
xy.links
list of matricies. All matricies should be of n x m where n is the length of y.top and m is the length of x.left. This information is displayed in the interactive plot window as hyperlinks. The values in these matricies should be complete web
asLinks
contains complete web address for points that should be treated as hyperlinks. Should be equal to the length of x.left
x.images
data frame of n x m which contains paths to images relating to the xpos. n should be the length of the xpos argument if xy.type is "image.midpoints" and length of xpos - 1 if xy.type is "image.boundaries" or "image.box". m columns contains inform
y.images
data frame of n x m which contains paths to images relating to the ypos. n should be the length of the ypos argument if xy.type is "image.midpoints" and length of ypos - 1 if xy.type is "image.boundaries" or "image.box". m columns contains informat
xy.images
list of matricies. All matricies should be of n x m where n is the length of y and m is the length of x when xy.type is "image.midpoint". All matricies should be of n x m where n is the length of y -1 and m is the length of x - 1 when xy.type

Value

  • List containing objects with interactive information.

Details

This function uses the x and y limits of the R plots and the boundaries of the figure to convert plot points to pixil coordinates. The function will make a rectangle region using the coordinates in x.left, y.top, x.right, y.bottom. The first rectangle would have the coordinates (x.left[1], y.bottom[1]),(x.left[1], y.top[1]), (x.right[1], y.top[1]), (x.right[1], y.bottom[1]). etc. The data matricies are checked for proper lengths and returned as a MapObj.

See Also

makeImap, automapPts

Examples

Run this code
# not called by user

Run the code above in your browser using DataLab