当前位置: 首页 > news >正文

花卉物流园做网站的素材家具设计软件

花卉物流园做网站的素材,家具设计软件,wordpress加速r,建设部网站官工程质量手册好久没有更新,今天来一个upset图的绘制 1.1 安装包 #绘制upset的包现在看来有三个 ## UpSet ### 最基本的upsetR包,使用方便,但是扩展不方便 devtools::install_github("hms-dbmi/UpSetR") ## complex-upset ### UpSet的升级款 支持ggplot2 devtools::install_git…

好久没有更新,今天来一个upset图的绘制

1.1 安装包

#绘制upset的包现在看来有三个
## UpSet
### 最基本的upsetR包,使用方便,但是扩展不方便
devtools::install_github("hms-dbmi/UpSetR")
## complex-upset 
### UpSet的升级款 支持ggplot2
devtools::install_github('krassowski/complex-upset')
## ggupset
### 同样是UpSet的升级款 支持ggplot2
devtools::install_github("const-ae/ggupset")

示例数据

library(ggplot2)
library(ggupset)
library(ComplexUpset)
test.list <- list(set1 = c("a", "b", "c"),set2 = c("b", "c", "d", "e"),set3 = c("c", "d", "e", "f")
)

UpSetR

#对于list,利用fromlist()整理数据
UpSetR::upset(fromList(test.list), order.by = "degree", #还可以选择"degree")

UpSetR

ComplexUpset

# 要求输入的是矩阵,如果数据是list,用formlist()转化一下就可以
test.df <- fromList(test.list)
ComplexUpset::upset(test.df,intersect = colnames(test.df))
# 与UpSetR不同的是支持ggplot2语法, 例如
ComplexUpset::upset(test.df, intersect = colnames(test.df), wrap= TRUE) + ggtitle("This is a title")

ComplexUpset::upset(test.df,intersect = colnames(test.df))
ggtitle("This is a title")

ggupset

# 同样是支持ggplot2语法, 但是输入会更加复杂一些
# 主要是通过scale_x_upset()来控制upset的输出, 例如
test.df <- fromList(test.list) %>% apply(2, as.logical) %>% t() %>% as.tibble(rownames = "setsnames") %>% pivot_longer(cols = -setsnames, names_to = "Sets", values_to = "stat") %>% filter(stat) %>% select(-stat) %>% group_by(Sets) %>% summarize(Set = list(setsnames))
> test.df
# A tibble: 6 × 2Sets  Set      <chr> <list>   
1 V1    <chr [1]>
2 V2    <chr [2]>
3 V3    <chr [3]>
4 V4    <chr [2]>
5 V5    <chr [2]>
6 V6    <chr [1]>
> str(test.df)
tibble [6 × 2] (S3: tbl_df/tbl/data.frame)$ Sets: chr [1:6] "V1" "V2" "V3" "V4" ...$ Set :List of 6..$ : chr "set1"..$ : chr [1:2] "set1" "set2"..$ : chr [1:3] "set1" "set2" "set3"..$ : chr [1:2] "set2" "set3"..$ : chr [1:2] "set2" "set3"..$ : chr "set3"test.df %>% ggplot(aes(x = Set)) +geom_bar() +scale_x_upset(order_by = "degree",reverse = T, )

在这里插入图片描述

# 然后利用 ggplot2 增加亿点细节
test.df %>% ggplot(aes(x = Set)) +geom_bar() +scale_x_upset(order_by = "degree",reverse = T, )+geom_text(stat='count', aes(label=after_stat(count)), vjust=-1) + scale_y_continuous(name = "Intersection size",expand = c(0, 0), limits = c(0, 6))+theme(text = element_text(family = "ARIAL", colour = "black", size = 9))+xlab('')+theme_combmatrix(combmatrix.label.make_space = TRUE, combmatrix.label.width = NULL, combmatrix.label.height = NULL, combmatrix.label.extra_spacing = 3, combmatrix.label.total_extra_spacing = unit(10, "pt"), combmatrix.label.text = element_text(family = "ARIAL", colour = "Pink", size = 9), combmatrix.panel.margin = unit(c(1.5, 1.5), "pt"), combmatrix.panel.striped_background = TRUE, combmatrix.panel.striped_background.color.one = "white", combmatrix.panel.striped_background.color.two = "#F7F7F7", combmatrix.panel.point.size = 3, combmatrix.panel.line.size = 1.2, combmatrix.panel.point.color.fill = "red", combmatrix.panel.point.color.empty = "#E0E0E0", )+theme(panel.border = element_rect(colour = "black", fill = NA, size = 2))+theme(panel.background = element_blank(),axis.text.y = element_text(size = 9))

在这里插入图片描述

http://www.yayakq.cn/news/830923/

相关文章:

  • a站全称网站建设需要知道什么
  • 做网站自动赚钱php mysql 网站开发实例教程
  • 济宁 创意大厦 网站建设硬件开发是程序员吗
  • 大连做网站团队app定制多少钱
  • 网站友情链接作用盐城网站建设服务
  • 被黑的网站内容管理系统开源
  • 现今网站开发的主流框架网站搭建品牌
  • 深圳中国电信网站备案网站怎么做才可以做评价
  • 无忧中英繁企业网站系统 完整如何选择丹阳网站建设
  • 润商网站建设学做网站是什么专业
  • 企业网站建设及维护费用网站建设项目付款方式
  • 电子商务网站建设产品wordpress 高德地图
  • 石家庄网站制作视频高端网站建设 杭州
  • 南宁网站推广方案如何做手机怎么同步连接wordpress
  • 遵义市住房和城乡建设局官方网站怎样做网站文件验证
  • 广州网站建设那家好许昌建设企业网站
  • 温州网站制作哪家好什么是电商平台怎么加入电商平台
  • 做动画 的 网站有哪些软件下载安阳县属于哪个省哪个市
  • 怎么在网站注册账号nginx反向代理内网网站建设
  • 企业网站开源代码广州品牌设计工作室
  • 招聘网站怎么做推广住房和城乡建设部网站 挂证通报
  • 养生类网站源码一件代发货源app
  • 做网站电子版报价模板一站式+wordpress
  • 男女做网站互联网行业特点
  • 郑州网站制作报价用wordpress搭建
  • 宁波网站建设外包做网站支付系统
  • flash 好的网站企业信息公开网站
  • 北京公司网站设计价格2008 iis 添加 网站 权限设置
  • php网站开发用什么软件性病医院网站优化服务商
  • 如何更改 网站 关键词制作一个简单的网站