Learn R Programming

prettyGraphs (version 2.2.0)

minmaxHelper: minmaxHelper

Description

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

Usage

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

Value

minMaxList

A list with the following values: minx, miny, maxx, maxy

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. 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.

findBounds

a boolean. If TRUE, min and max values are found for positive and negative on axis1 and axis2. If FALSE, one value is used for all constraints.

Author

Derek Beaton

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