61_check_xy_relationship: Test Axis Relationship

Description Usage Arguments Details Value Examples

Description

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

Usage

1
test.xyrel (x, y, fv)

Arguments

x, y

Optional numeric vectors.

fv

A numeric matrix.

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.

Value

Refer to details.

Examples

1
2
3
4
5
6
7
8
fv1 <- matrix (1:40, 2, 20)
fv2 <- matrix (1:50, 2, 25)

test.xyrel (,,fv1)
test.xyrel (seq (0, 1,, 2), seq (0, 20,, 20), fv1)

test.xyrel (,,fv2)
test.xyrel (seq (0, 1,, 2), seq (0, 1,, 25), fv1)

barsurf documentation built on Jan. 20, 2021, 5:08 p.m.