Skip to content

Improve handling of “successive situations” in dynamic plots and add automatic multiline title wrapping#169

Merged
sbuis merged 3 commits into
mainfrom
feature/dynamic-plots-robust-successive-situations
Jun 19, 2026
Merged

Improve handling of “successive situations” in dynamic plots and add automatic multiline title wrapping#169
sbuis merged 3 commits into
mainfrom
feature/dynamic-plots-robust-successive-situations

Conversation

@sbuis

@sbuis sbuis commented Jun 19, 2026

Copy link
Copy Markdown
Member

Description

This PR introduces two improvements in CroPlotR related to dynamic plots:

  1. Systematic support for the “successive situations” case across all dynamic plotting functions.
  2. Automatic formatting of long plot titles into multiple lines when a defined length threshold is exceeded.

Changes

  • Extended the handling of the successive situations workflow to all dynamic plot types (previously only implemented for the base case).
  • Ensured consistent behaviour across the plotting API when multiple situations are provided in sequence.
  • Added automatic title wrapping:
    • Detects when a title exceeds a given character length threshold.
    • Splits the title into multiple lines for improved readability.
    • Applied specifically to plots generated under the successive situations workflow.
  • Improved robustness of automatic plot rendering in cases with long, concatenated titles.

Motivation

  • The previous implementation only partially supported successive situations, leading to inconsistent behaviour across plot types.
  • Long automatically generated titles could become unreadable or overlap with plot elements, reducing clarity in dynamic visual outputs.

Linked issues

Closes #168

sbuis and others added 3 commits June 19, 2026 17:06
…automatic multiline title wrapping

Propagate the 'successive' argument through the plotting dispatcher and specific plot functions to support contiguous/successive situations.

Implement add_vertical_lines(df_data, successive, p) to draw vertical separators and make_multiline_title(title, max_char) to split long titles across lines for "successive situations"

Update many plot_dynamic_* function signatures to accept 'successive', call add_vertical_lines, and use the multiline title helper.
@github-actions

Copy link
Copy Markdown

📝 Styler has automatically formatted the following R files in this PR:

  • R/specific_plotting_dynamic.R

Please pull these changes to your local branch.

@sbuis
sbuis merged commit 4d52f03 into main Jun 19, 2026
5 of 8 checks passed
@sbuis
sbuis deleted the feature/dynamic-plots-robust-successive-situations branch June 19, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve handling of “successive situations” in dynamic plots and add automatic multiline title wrapping

1 participant