r - 左右对齐考克斯图
问题描述
我在对齐两个地块时遇到问题。如果我选择axis = "r"
它完全向右对齐,如果我选择axis =“l”,它完全向右对齐,但是,我不能让它两边都对齐。有小费吗?
plot_grid(p1, p2, ncol = 1,align = "v",axis = "r",rel_heights = c(4, 0.4))
p2 <- ggplot(val.m,aes(variable,Row)) + geom_point(aes(colour=value)) +
scale_color_manual(values=c("white","black")) + facet_wrap(~GO) + theme_classic(base_size = 8) +
theme(panel.background = element_rect(fill = NA, color = "black")) +
theme(strip.background = element_blank(),
strip.text.x = element_blank())
p1 <- ggplot(df, aes(x=Comparison, reorder(V2,logFC))) +
geom_tile(colour="black", size=0.25, aes(fill=logFC)) +
scale_fill_gradient2(low="#2171b5",mid="white",high="#ef6548") +
theme_classic(base_size = 8) +
theme(axis.text.x = element_text(angle = 45,hjust = 1)) +
facet_grid(~GO) +
geom_point( aes( x = Comparison, y = V2, size= AveExpr),shape=1) +
scale_size("Expression\n(cpm, log2)",range=c(0,2)) +
labs(y="Gene") +
theme(panel.background = element_rect(fill = NA, color = "black"))
解决方案
推荐阅读
- amazon-web-services - 对其他 IAM 用户隐藏 EC2 实例
- .net - 为 ASP.NET Core lambda 函数 serverless.template 文件设置 AWS Authorizer 条目
- loops - Haskell:没有 (Num ()) 的实例 - 定义我自己的一元循环
- java - 设计 - 消费者模块的全局设置
- c# - c# - 如何用内联样式标签将span替换为c#中的b标签?
- reactjs - Reactjs map 函数不渲染组件
- node.js - 无法将 React 应用程序部署到 Kubernetes
- c# - 模型状态在 asp.Net Core web Api 2.1.1 中始终为真
- java - Spring Boot DataJpaTest 单元测试恢复到 H2 而不是 mySql
- php - 优化 PHP 数组提取查询(尽可能使用函数运算符)