View source: R/plot.stslist.freq.R
plot.stslist.freq | R Documentation |
Plot method for output produced by the seqtab
function, i.e objects of class stslist.freq
.
## S3 method for class 'stslist.freq'
plot(x, cpal = NULL, missing.color = NULL, pbarw = TRUE,
ylab = NULL, yaxis = TRUE, xaxis = TRUE,
xtlab = NULL, xtstep = NULL, tick.last = NULL, cex.axis = par("cex.axis"),
cex.plot, ...)
x |
an object of class |
cpal |
alternative color palette to be used for the states. If user specified, a vector of colors with number of elements equal to the number of states in the alphabet. By default, the |
missing.color |
alternative color for representing missing values inside the sequences. By default, the |
pbarw |
if |
ylab |
label of the y axis. If set to |
yaxis |
if |
xaxis |
if |
xtlab |
tick labels of the x-axis. If unspecified, the |
xtstep |
interval at which the tick-marks and labels of the x-axis are displayed. For example, with xtstep=3 a tick-mark is drawn at position 1, 4, 7, etc... The display of the corresponding labels depends on the available space and is dealt with automatically. If unspecified, the |
tick.last |
Logical. Should a tick mark be enforced at the last position on the x-axis? If unspecified, the |
cex.axis |
Axis annotation magnification. See |
... |
further graphical and |
cex.plot |
Deprecated. Use |
This is the plot method for output of the seqtab
function, i.e., for objects of class stslist.freq. It plots the sequences bottom-up according to their frequency in the data set.
The method is invoked by seqfplot
(seqplot
with type="f"
), which produces frequency plots with automatic display of the state color legend and allows plotting by group.
Alexis Gabadinho and Gilbert Ritschard
seqfplot
## Loading the 'actcal' example data set
data(actcal)
## Defining a sequence object with data in columns 13 to 24
## (activity status from january to december 2000)
actcal.lab <- c("> 37 hours", "19-36 hours", "1-18 hours", "no work")
actcal.seq <- seqdef(actcal, 13:24, labels=actcal.lab)
## 10 most frequent sequences in the data
actcal.freq <- seqtab(actcal.seq)
## Plotting the object
plot(actcal.freq, main="Sequence frequencies - actcal data set")
## Plotting all the distinct sequences without borders
## and space between sequences
actcal.freq2 <- seqtab(actcal.seq, idxs=0)
plot(actcal.freq2, main="Sequence frequencies - actcal data set",
border=NA, space=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.