
Plot groups per year: the clustering fan converging to the final groups
Source:R/plot_groups_per_year.R
plot_groups_per_year.RdThe stock-side bridge view. One column per year; within a column the
cluster-year nodes are ranked by paper count with the largest at the baseline,
dot area encodes paper count, and (optionally) the number of groups that year
is printed atop the column. No succession edges, no birth rings – it shows the
annual + cumulative clustering fan settling onto the final-year groups. It is
the stock-side counterpart of the flow-side plot_trajectory_dag(), and reads
the sniff_trajectory_dag() object directly.
Usage
plot_groups_per_year(
dag,
color_terminal = FALSE,
point_size = 6,
show_count = TRUE,
count_size = 3.2,
count_colour = "white",
count_fill = "grey45",
label_terminal = TRUE,
label_size = 3,
axis_text_size = NULL,
title = "Groups per year"
)Arguments
- dag
A
sniff_trajectory_dag()object.- color_terminal
Colour the dots by
terminal_groupto foreshadow the braid (defaultFALSE, a single neutral grey that reads as stock). The colour legend is suppressed either way.- point_size
Upper bound of the dot-size range; paper count is mapped to
[1, point_size](default6).- show_count
Print the number of groups atop each year column, on a filled label for emphasis (default
TRUE).- count_size
Font size of the per-year group-count text (default
3.2).- count_colour
Font colour of the count text (default
"white").- count_fill
Background colour of the count label (default
"grey45", a grey chip that makes the count stand out); use"white"for a plain box.- label_terminal
Label the final-year nodes with their group id (
c1gN) to the right of the last column, with a leader line (defaultTRUE).- label_size
Font size of the final-node labels (default
3).- axis_text_size
Font size of the x-axis (year) tick labels;
NULL(default) keeps the theme default.- title
Plot title (default
"Groups per year");NULLfor none.
Details
The visual encoding:
One column per year along the x-axis; the y-axis has no intrinsic meaning (nodes are stacked by rank).
Within a column the cluster-year nodes are ranked by paper count with the largest at the baseline, and dot area encodes the paper count.
With
show_count = TRUEthe number of groups that year is printed atop the column on a filled label (count_fill/count_colour).There are no succession edges and no births: this is the stock-side view of how many groups exist each year and how large they are, settling onto the final-year groups. For the flow (edges, trajectories) use
plot_trajectory_dag().With
label_terminal = TRUEthe final-year nodes are labelledc1gNto the right of the last column.
See also
sniff_trajectory_dag(), plot_trajectory_dag(),
plot_trajectory_dag_interactive()
Other visualization:
plot_groups_influence_matrix(),
plot_groups_influence_network(),
plot_groups_lineage_2d(),
plot_groups_lineage_3d(),
plot_groups_map(),
plot_groups_map_animation(),
plot_groups_map_interactive(),
plot_trajectory_confluence(),
plot_trajectory_confluence_interactive(),
plot_trajectory_confluence_matrix(),
plot_trajectory_dag(),
plot_trajectory_dag_interactive(),
plot_trajectory_dispersion(),
plot_trajectory_dynamics(),
plot_trajectory_dynamics_interactive(),
plot_trajectory_formation(),
plot_trajectory_lines_2d(),
plot_trajectory_lines_3d()
Examples
if (FALSE) { # \dontrun{
# docs_per_group comes from sniff_groups_lineage()
dag <- sniff_trajectory_dag(docs_per_group)
plot_groups_per_year(dag)
# colour the dots by destination, bigger count chips and year labels
plot_groups_per_year(dag, color_terminal = TRUE, count_size = 5, axis_text_size = 14)
} # }