DESeq2 PCA에서 다른 geom_point 모양에 대한 검은 윤곽선 추가
Nov 24 2020
DESeq2 패키지로 PCA를 실행 중이며 이미 관찰을 기반으로 한 모양에 검은 윤곽선을 얻고 싶습니다. 둥근 모양은 작동하지만 다른 모양은 작동하지 않습니다.
같은 예제 만들기 stat_ellipse {ggplot2} 개요 geom_point 채우기 색상 이나 장소는 점 주위에 테두리는 데이터가 하나 개의 단지 형태로 꾸몄다있다.
이전에 큰 데이터 세트에서 PCA를 수행 했으므로 재현 가능한 예제를 제공하기는 어렵지만 다음을 실행했습니다.
ggplot(pcaData, aes(x = PC1, y = PC2, color = dFe, shape = location))+
geom_point(size=5)+
geom_point(aes(PC1, PC2, color = dFe, shape = location), shape= 21, colour="black", size= 5)
핵심은 새로운 레이어의 코딩에 있다고 생각합니다. geom_point

달리는 scale_fill_manual I get the following
ggplot(pcaData, aes(x = PC1, y = PC2, color = dFe, shape = location))+
geom_point(size=5)+ scale_shape_manual(values=c(21,22,23))

답변
2 KonradRudolph Nov 24 2020 at 23:15
내 의견에서 언급했듯이을 사용 scale_shape_manual
하고 fill
미학을 제공하십시오 .
ggplot(pcaData, aes(x = PC1, y = PC2, fill = dFe, shape = location)) +
geom_point(color = 'black', size = 5) +
scale_shape_manual(values = c(21L, 22L, 23L))

1 Mohanasundaram Nov 24 2020 at 23:10
이 시도:
ggplot(pcaData, aes(x = PC1, y = PC2, shape = location))+
geom_point(size=7) +
geom_point(aes(x = PC1, y = PC2, color = dFe, shape = location), size=5)
