Plot method for objects obtained with an algorithm of the lphom-family (lphom, tslphom, nslphom, tslphom_dual, nslphom_joint, ....).
# S3 method for lphom
plot(
x,
complete = FALSE,
margins = TRUE,
digits = 2,
row.names = NULL,
col.names = NULL,
size.numbers = 6,
size.labels = 4,
size.margins = 4,
colour.cells = "deeppink3",
colour.grid = "blanchedalmond",
alpha = 0.5,
which = NULL,
...,
type = "w",
show.plot = TRUE
)
Invisibly returns the (ggplot) description of the plot, which is a list with components that contain the plot itself, the data, information about the scales, panels etc.
An object output of a lphom
family algorithm.
A TRUE/FALSE
argument informing if the complete matrix should be displayed. In raw
, regular
, ordinary
and enriched
scenarios the plot includes the row and the column corresponding to net_entries and net_exits even when they are really small, less than 1% in all units. Default, FALSE
.
A TRUE/FALSE`` argument informing if the margins of the matrix should be displayed. Default
TRUE`.
Integer indicating the number of decimal places to be shown. Default, 2.
Names to be used for the rows of the matrix.
Names to be used for the columns of the matrix.
A reference number indicating the average font size to be used for the transfer numbers. Default, 6.
A number indicating the font size to be used for labels. Default, 4.
A number indicating the font size to be used for margin numbers. Default, 4.
Background base colour for cells.
Colour to be used for grid lines.
A [0,1] number of colour transparency.
A vector of integers informing the units for which the aggregate transfer matrix should be plotted. Default, NULL
, the global matrix is shown.
Other arguments passed on to methods. Not currently used.
A character string indicating the solution (transfer matrix) to be plotted. Only valid for _dual algorithms. type = "w"
stands for the weighted solution and type = "a"
for the simple average solution. Default w
.
A TRUE/FALSE
argument indicating if the plot should be displayed as a side-effect. By default, TRUE
.
Jose M. Pavia, pavia@uv.es
mt.ns <- nslphom(France2017P[, 1:8] , France2017P[, 9:12], new_and_exit_voters= "raw")
p <- plot(mt.ns, show.plot = FALSE)
p
Run the code above in your browser using DataLab