相关疑难解决方法(0)

如何仅显示极地ggplot的绘图区域的一部分?

假设极坐标中有一个数据集被绘制为扇区

library(ggplot2)
library(reshape2)
data <- melt(matrix(rnorm(1000), nrow = 20))
data$type <- 1:2
data$Var1 <- data$Var1*6 - 60

ggplot(data, aes(Var1, Var2)) + 
  geom_tile(aes(fill = value)) + 
  coord_polar(theta = "x", start = pi) + 
  scale_x_continuous(limits = c(-180, 180)) +
  facet_wrap(~type)
Run Code Online (Sandbox Code Playgroud)

它给出了下图: 在此输入图像描述

如何在不完整圆圈的情况下移除绘图的底部(空白)部分?

r ggplot2

19
推荐指数
1
解决办法
2014
查看次数

标签 统计

ggplot2 ×1

r ×1