Skip to content

better axis and margin#432

Closed
matyasbukva wants to merge 3 commits intojasp-stats:masterfrom
matyasbukva:plotBuilder_better_axis
Closed

better axis and margin#432
matyasbukva wants to merge 3 commits intojasp-stats:masterfrom
matyasbukva:plotBuilder_better_axis

Conversation

@matyasbukva
Copy link
Contributor

better axis and margin and p value handling logic.

better axis and margin  and p value handling logic.
@shun2wang shun2wang requested a review from vandenman November 4, 2025 11:33
Copy link
Contributor

@vandenman vandenman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look fine, but is there an issue associated with this and any figure of the pre-post behavior?

adjust_args_yaxis$title <- titleValueY
}

# --- Limit beállítások ---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use English for comments/ variable names.

Copy link
Contributor Author

@matyasbukva matyasbukva Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't deal with this this week because I'm on a short vacation . But feel free to delete this comment anyway.

@matyasbukva
Copy link
Contributor Author

This PR only changes the visual appearance of the raincloud plot; the underlying data and statistical results are unchanged.

How to reproduce the issue on master:

  1. Add a categorical variable on the x-axis and a continuous variable on the y-axis.
  2. Enable jittered points.
  3. Add one or more p-values above the plot.

Observed behavior on master:

  • Even when the title is empty, vertical space is still reserved for it, resulting in asymmetric margins.
  • The y-axis margins are fixed to the data limits, so jittered points can partially fall outside the visible plotting area.
  • When multiple p-values are added, the available top padding is often insufficient and p-value labels can overlap.

Improvements introduced in this PR:

  • Empty title space is no longer reserved, resulting in symmetric plot margins.
  • Y-axis margins are adjusted to ensure jittered points remain fully visible.
  • Top padding is increased dynamically when multiple p-values are added, preventing overlap.

Overall, this results in a cleaner and more readable plot, while remaining fully compatible with figures created in previous versions.

image

@matyasbukva matyasbukva closed this by deleting the head repository Mar 12, 2026
@matyasbukva
Copy link
Contributor Author

I just noticed that this wasn't merged after all...

@tomtomme tomtomme self-requested a review March 12, 2026 18:11
@tomtomme tomtomme added the enhancement New feature or request label Mar 12, 2026
@tomtomme tomtomme removed their request for review March 12, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants