Learn R Programming

mdatools (version 0.9.1)

mdaplot.getAxesLim: Calculate axes limits

Description

Calculates axes limits depending on data values that have to be plotted, extra plot elements that have to be shown and margins.

Usage

mdaplot.getAxesLim(x.values, y.values, lower = NULL, upper = NULL,
  show.colorbar = F, show.lines = F, legend = NULL, show.legend = F,
  legend.position = "topright", show.labels = F)

Arguments

x.values

a vector with x values.

y.values

a vector or a matrix with y values.

lower

a lower margin for y limits.

upper

an upper margin for y limits.

show.colorbar

logical, show or not the colorbar on the plot.

show.lines

logical or numeric with line coordinates to be shown on the plot.

legend

vector with legend items.

show.legend

logical, show or not legend on the plot.

legend.position

position of the legend (see mdaplotg for details).

show.labels

logical, show or not labels for the data objects

Value

Returns a list with four limits for the x and y axes.

Details

Data can be a list with several matrices or just one matrix. The matrices can have single.x configuration, where first column is x values and the others are y values or normal configuration, where every odd column is x values and every even is corresponding y values.