mdaplotg
is used to make different kinds of plots or their combination for several sets
of objects.
mdaplotg(data, groupby = NULL, type = "p", pch = 16, lty = 1, lwd = 1,
bwd = 0.8, legend = NULL, xlab = NULL, ylab = NULL, main = NULL,
labels = NULL, ylim = NULL, xlim = NULL, colmap = "default",
legend.position = "topright", show.legend = T, show.labels = F,
show.lines = F, show.grid = T, xticks = NULL, xticklabels = NULL,
yticks = NULL, yticklabels = NULL, show.excluded = FALSE,
lab.col = "darkgray", lab.cex = 0.65, xlas = 1, ylas = 1, ...)
a matrix, data frame or a list with data values (see details below).
one or several factors used to create groups of data matrix rows (works if data is a matrix)
type of the plot ('p', 'l', 'b', 'h', 'e').
a character for markers (same as plot
parameter).
the line type (same as plot
parameter).
the line width (thickness) (same as plot
parameter).
a width of a bar as a percent of a maximum space available for each bar.
a vector with legend elements (if NULL, no legend will be shown).
a title for the x axis (same as plot
parameter).
a title for the y axis (same as plot
parameter).
an overall title for the plot (same as plot
parameter).
what to use as labels ('names' - row names, 'indices' - row indices, 'values' - values).
limits for the y axis (if NULL, will be calculated automatically).
limits for the x axis (if NULL, will be calculated automatically).
a colormap to use for coloring the plot items.
position of the legend ('topleft', 'topright', 'top', 'bottomleft', 'bottomright', 'bottom').
logical, show or not legend for the data objects.
logical, show or not labels for the data objects.
vector with two coordinates (x, y) to show horizontal and vertical line cross the point.
logical, show or not a grid for the plot.
tick values for x axis.
labels for x ticks.
tick values for y axis.
labels for y ticks.
logical, show or hide rows marked as excluded (attribute `exclrows`)
color for data point labels.
size for data point labels.
orientation of xticklabels
orientation of yticklabels
other plotting arguments.
The mdaplotg
function is used to make a plot with several sets of objects. Simply
speaking, use it when you need a plot with legend. For example to show line plot with spectra
from calibration and test set, scatter plot for height and weight values for women and men, and
so on.
Most of the parameters are similar to mdaplot
, the difference is described below.
The data should be organized as a list, every item is a matrix with data for one set of objects.
Alternatively you can provide data as a matrix and use parameter groupby
to create groups.
See tutorial for more details.
There is no color grouping option, because color is used to separate the sets. Marker symbol, line style and type, etc. can be defined as a single value (one for all sets) and as a vector with one value for each set.