Plot function that modifies and expands the graphics package's graphics::matplot() function in several ways.
Arguments
- x
Numeric or character: vector of x-coordinates. If missing, a numeric vector
1:...is created having as many values as the rows ofy.- y
Numeric or character: vector of y coordinates. If missing, a numeric vector
1:...is created having as many values as the rows ofx.- xlim, ylim
NULL(default) or a vector of two values. In the latter case, if any of the two values is not finite (includingNAorNULL), then theminormaxx- ory-coordinates of the plotted points are used.- xdomain, ydomain
Character or numeric or
NULL(default): vector of possible values of the variables represented in thex- andy-axes, in case thexoryargument is a character vector. The ordering of the values is respected. IfNULL, thenunique(x)orunique(y)is used.- alpha.f
Numeric, default 1: opacity of the colours,
0being completely invisible and1completely opaque.- xjitter, yjitter
Logical or
NULL(default): addbase::jitter()tox- ory-values? Useful when plotting discrete variates. IfNULL, jitter is added if the values are of character class.- grid
Logical: whether to plot a light grid. Default
TRUE.- ...
Other parameters to be passed to
graphics::matplot().
Details
Some of the additional features provided by flexiplot are the following. First, either or both x and y arguments can be of class base::character. In this case, axes labels corresponding to the unique values are used (see arguments xdomain and ydomain). A jitter can also be added to the generated points, via the xjitter and yjitter switches. Second, it allows for the specification of only a lower or upper limit in the xlim and ylim arguments. Third, it uses a cleaner plotting style and a default argument type = 'l' (line plot) rather than type = 'p' (point plot).