Outputs all the boxes and arrow
prTpPlotBoxes(
overlap_order,
transition_flow,
no_boxes,
box_width,
tot_spacing,
txt,
cex,
txt_gpar = NULL,
prop_start_sizes,
prop_end_sizes,
box_prop,
lwd_prop_total = lwd_prop_total,
fill_start_clr,
fill_end_clr,
txt_start_clr,
txt_end_clr,
lwd = 2,
line_col = "#000000",
min_lwd,
max_lwd,
overlap_add_width,
overlap_bg_clr,
type_of_arrow,
abs_arrow_width,
arrow_clr,
transition_arrow_props,
color_bar_subspace,
plot_arrows = TRUE,
proportion = FALSE
)
void
The order from first->last for the lines. This means that the last line will be on top while the first one will appear at the bottom. This should be provided as a vector.
This should be a matrix with the size of the transitions.
The unit for each cell should be number of observations, row/column-proportions
will show incorrect sizes. The matrix needs to be square. The best way to generate
this matrix is probably just do a table(starting_state, end_state)
. The rows
represent the starting positions, while the columns the end positions. I.e. the first
rows third column is the number of observations that go from the first class to the
third class.
Number of boxes to plot
The width of the box. By default the box is one fourth of the plot width.
The proportion of the vertical space that is to be left empty. It is then split evenly between the boxes.
The text
The cex gpar
of the text
The [grid::gpar()] object that is overridden with col & cex by other parameters
The proportion of the different boxes to the left
The proportion of the different boxes to the right
If you want the boxes to have proportions indicating some other factors then input
a matrix with quantiles for the proportions. Note the size must be nrow(transition_flow) x 2
.
The width of the lines may be proportional to either the other flows from that box, or they may be related to all flows. This is a boolean parameter that is set to true by default, i.e. relating to all flows.
The color of the boxes to the left
The color of the boxes to the right
The text color of the start boxes. This can either be a single value or a vector if you desire different colors for each box. If you specify box_prop then this has to be a 2 column matrix.
The text color of the end boxes. This can either be a single value or a vector if you desire different colors for each box. If you specify box_prop then this has to be a 2 column matrix.
The line width
The color of the line
The minimum width of the line that we want to illustrate the tranisition with.
The maximum width of the line that we want to illustrate the tranisition with.
The width of the white cross-over line. You can specify this as a scalar multiplication of the current line width. In case of non-grid arrows then you can also have this as a unit which is recommended as it looks better. If the scalar is < 1 then the overlap is ignored.
In order to enhance the 3D perspective and to make it easier to follow arrows the arrows have a background color to separate them from those underneath.
The types of arrow may be grid, simple, or gradient. Simple grid
arrows are the bezierGrob
arrows (not that pretty),
simple is the bezierArrowSmpl
that I've created to get a more exact
control of the arrow position and width, while gradient
corresponds to bezierArrowGradient
allowing the arrow to have a fill color that slowly turns into the color of the arrow.
The absolute width of the arrow
The color of the arrows. Usually black, can be a vector indicating each arrow from first to last arrow (counting from the top). If the vector is of the same length as the boxes then all box arrows will have the same color (that is all the arrows stemming from the left boxes)
The proportions of the different transitions if available.
If there is little or no difference at the low/high proportions of the spectrum then it can be of interest to focus the color change to the center leaving the tails constant
If we are plotting shadow boxes then
arrows should not be plotted and this should be set to FALSE
It there is a proportion