Skip to content

A collection of changes for visual improvements#271

Open
ycl6 wants to merge 4 commits into
hms-dbmi:masterfrom
ycl6:number_angles
Open

A collection of changes for visual improvements#271
ycl6 wants to merge 4 commits into
hms-dbmi:masterfrom
ycl6:number_angles

Conversation

@ycl6
Copy link
Copy Markdown

@ycl6 ycl6 commented Feb 25, 2026

This PR makes the following changes to the current code base

  1. When using number.angles to specify the rotation of the number labels above the bars, angles between 0 and 90 will now place the number in a better position visually [Rotated bar labels off-center #70, number.angles error #78, Plot only n-way intersections, filter out empty intersections, number position above intersections #133]
  2. vjust is used to increase the set title (as specify by column) above the heatmap when incorporating set metadata
  3. plot_lims is changed to factor to that the boxplot can be properly aligned [Boxplot not align with the main plot #195]
  4. changes were makde to replace the deprecated aes_string function and wrong use of size to specify line widths [updates for ggplot2 upgrade? #270]

On [1], these are the plots before the changes

upset(movies, number.angles = 0)
actual-reprex-code-1
upset(movies, number.angles = 45)
actual-reprex-code-2
upset(movies, number.angles = 90)
actual-reprex-code-3

On [1], these are the plots after the changes

upset(movies, number.angles = 0)
actual-reprex-code-1
upset(movies, number.angles = 45)
actual-reprex-code-2
upset(movies, number.angles = 90)
actual-reprex-code-3

ycl6 added 4 commits February 25, 2026 11:45
The original hjust and vjust work when `number.angles = 0`,
however, the numbers rotated at 45- and 90-degree angle will become out of place above the bars.

This commit adds the ability to adjust hjust and vjust when other angles (between 0 and 90) are used.
This commit update all instances of the now deprecated `aes_string()` with `aes()`.

Also, the `linewidth` argument is used in place of `size` to set the widths of lines in ggplot.Z
@ycl6
Copy link
Copy Markdown
Author

ycl6 commented Feb 25, 2026

To install this patch, you can use the remotes::install_github() as below:

# Remove UpSetR
remove.packages("UpSetR")

# Install the `number_angles` patch
remotes::install_github("ycl6/UpSetR@number_angles")

or

# Remove UpSetR
remove.packages("UpSetR")

# Install from PR #271
remotes::install_github("hms-dbmi/UpSetR", ref = remotes::github_pull(271))

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.

1 participant