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

@ycl6 ycl6 commented Feb 25, 2026

Copy link
Copy Markdown

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

ycl6 commented Feb 25, 2026

Copy link
Copy Markdown
Author

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))

ycl6 added 4 commits July 30, 2026 11:55
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
@tiekneeshrimp

tiekneeshrimp commented Aug 7, 2026

Copy link
Copy Markdown

Hi @ycl6 ! Thanks so much for updating this! I tried both of these options:

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

and

remotes::install_github("ycl6/UpSetR@number_angles")

Both of which resulted in this error:

Error in github_resolve_ref.github_pull(meta$ref %||% ref, meta, host = host,  : 
  Cannot find GitHub pull request hms-dbmi/UpSetR#271
HTTP error 401.
  Bad credentials

@ycl6

ycl6 commented Aug 9, 2026

Copy link
Copy Markdown
Author

Hi @tiekneeshrimp The error seems to be related to Github PAT (personal access tokens) set up and rate limit is restricting access.

Perhaps looking into your GITHUB_PAT like mentioned here will help?

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.

2 participants