相关疑难解决方法(0)

R :: ggplot2 :: geom_points:如何用饼图交换点?

我想在两个维度中绘制饼图,以根据其复合"组"显示每个点的组成.

到目前为止,我正在使用标签排斥标记到最高得分点,但它仍然不是很好.我环顾四周,我还没有看到我在寻找什么.

ggplot(data=aggtmp2,aes(x=cluster,y=x,color=groups,shape=dataset)) +
 geom_jitter() + facet_grid(datasubset~.) +
 geom_text_repel(data=aggtmp2[aggtmp2$xnorm>.925,],aes(label=groups),size=2)


> str(aggtmp2)
'data.frame':   562 obs. of  7 variables:
  $ group_name: chr  "1_1_D1NF_lewisnegative" "1_1_D1NF_lewisnegative" "1_1_D1NF_lewisnegative" "1_1_D1NF_lewisnegative" ...
  $ cluster   : Factor w/ 39 levels "10of10","1of1",..: 30 24 11 18 25 18 30 11 25 24 ...
  $ x         : num  0.591 0.591 0.591 0.591 0.591 ...
  $ xnorm     : num  0.921 0.921 0.921 0.921 0.921 ...
  $ groups    : Factor w/ 43 levels "1_1","1_2","1_3",..: 1 1 1 1 1 2 2 2 …
Run Code Online (Sandbox Code Playgroud)

r composite fill ggplot2 pie-chart

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

标签 统计

composite ×1

fill ×1

ggplot2 ×1

pie-chart ×1

r ×1