admin管理员组文章数量:1134555
I have figured out how to do most of the formatting changes on my upset plot but can't figure out how to move the y-axis label on the intersection size plot closer to the y-axis. I can move it up and down, but not further right.
library(extrafont)
library(ComplexUpset)
library(data.table)
library(tidyverse)
library(extrafont)
library(dplyr)
movies = as.data.frame(ggplot2movies::movies)
genres = colnames(movies)[18:24]
movies[genres] = movies[genres] == 1
movies<-movies %>%
head(2000)
ComplexUpset::upset(
movies,
genres,
name = "Genre Combination",
width_ratio = 0.5,
min_size = 2,
set_sizes = FALSE,
labeller = ggplot2::as_labeller(c('Drama' = 'LONG DRAMA LABEL', 'Comedy' =
'LONG COMEDY LABEL')),
base_annotations = list('Intersection size' = (
intersection_size(text = list(
vjust = 0.4,
hjust = -0.1,
angle = 90
)) +
theme(axis.title.y = element_text(hjust = -0.5, vjust = -1))
)
)
)
I tried using axis.title.y to change position. hjust moves the label up and down but vjust does not move the label left or right as expection.
I have also tried modifying the theme outside the "base annotations" section but I can't quite figure out what the difference is between the two.
本文标签:
版权声明:本文标题:complex upset - ComplexUpset: move the y-axis title of the intersect size barplot closer to the Y-axis and adjust position of ax 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736770637a1952066.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论