Learn R Programming

barsurf (version 0.5.0)

11_other_supporting_functions_1: Test Axis Relationship

Description

Estimate the (plotting) relationship between the x and y axes.

Usage

test.xyrel (x, y, fv)

Arguments

x, y

Optional numeric vectors.

fv

A numeric matrix.

Value

Refer to details.

Details

This function is designed to work with the xyrel argument in the main plotting functions.

It returns "f" (for a fixed aspect ratio of one) or "m" (for maximized).

If the ratio between the x-size and the y-size is between 0.1 and 10, it will return "f". Otherwise, it returns "m".

If both x any y are missing, the "size" refers to the dimensions of the matrix. (So, returns "f" for up to ten times more columns than rows, or vice versa).

If both x and y are supplied, the "size" refers to xlim and ylim, computed from the ranges of x and y.

If one is supplied but the other is not, then "m" is returned.

Examples

Run this code
# NOT RUN {
fv <- matrix (1:20, 2, 10)
test.xyrel (,,fv)
# }

Run the code above in your browser using DataLab