Learn R Programming

mdatools (version 0.7.0)

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(data, single.x = T, show.colorbar = F, show.lines = F, legend = NULL, show.legend = F, legend.position = "topright", show.labels = F, xticks = NULL, yticks = NULL)

Arguments

data
a matrix or list with data values (values to be plotted).
single.x
logical, has data matrix (matrices) one column for X and many for Y or not.
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
xticks
values for x ticks to show
yticks
values for yticks to show

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.