Learn R Programming

prettyGraphs (version 1.0)

minmaxHelper: minmaxHelper

Description

Computes the x- and y- axis constraints for all prettyGraphs functions.

Usage

minmaxHelper(mat1, mat2 = NULL, axis1 = 1, axis2 = 2)

Arguments

mat1
Matrix that will be plotted. Must be at least 2 rows by 2 columns.
mat2
if NULL, mat2=mat2. Second matrix that will be plotted (if a biplot). Must be at least 2 rows by 2 columns.
axis1
Which column of the matrix will be the x-axis? Default = 1.
axis2
Which column of the matrix will be the y-axis? Default = 2.

Value

  • minMaxListA list with the following values: minx, miny, maxx, maxy

Examples

Run this code
data(beavers)
	minMaxList <- minmaxHelper(as.matrix(beaver1),as.matrix(beaver1),1,2)

Run the code above in your browser using DataLab