나는 서로 비교되는 방식을 쉽게 볼 수있는 방식으로 많은 상대 주파수를 시각화하는 방법에 대한 문제를 머리로 감싸려고 노력했습니다. 배포 측면에서 그 차이는 크지 않으며, 물론 보여줄만한 가치도 있다고 생각합니다. 비교적 간단한 점 플롯을 만들 수 있었지만 실제로는 충분하지 않다고 생각합니다.
코드는 간단합니다 (시각적 조정에 관한 한 미완성 임에도 불구하고).
library(ggplot2)
copuladeletion <- read.table(text = "Type Distribution Family
NP 0.39344 Austronesian
NP 0.30232 Mon-Khmer
NP 0.3125 Tai-Kadai
NP 0.29230 Sinitic
NP 0.26785 Other
AdjP 0.44262 Austronesian
AdjP 0.53488 Mon-Khmer
AdjP 0.625 Tai-Kadai
AdjP 0.55384 Sinitic
AdjP 0.58928 Other
AdvP 0.03278 Austronesian
AdvP 0.00000 Mon-Khmer
AdvP 0.00000 Tai-Kadai
AdvP 0.04615 Sinitic
AdvP 0.07142 Other
EX 0.01639 Austronesian
EX 0.02325 Mon-Khmer
EX 0.00000 Tai-Kadai
EX 0.03076 Sinitic
EX 0.01785 Other
Clause 0.08196 Austronesian
Clause 0.02325 Mon-Khmer
Clause 0.0625 Tai-Kadai
Clause 0.03076 Sinitic
Clause 0.05357 Other
Other 0.01639 Austronesian
Other 0.11627 Mon-Khmer
Other 0.00000 Tai-Kadai
Other 0.04615 Sinitic
Other 0.00000 Other", header = TRUE)
ggplot(copuladeletion) + geom_point(aes(Distribution, Type, colour=Family,size=1))
다음 이미지가 생성됩니다.
그래서 내 질문은 다음과 같습니다.
이 시각화가 충분히 잘 작동한다고 생각하십니까? 이러한 데이터에 대해 단순 점 그림보다 바람직한 옵션이 있습니까?
미리 감사드립니다!
아마도 스트립 차트에 대한 또 다른 해석 일 것입니다.
library(ggplot2)
copuladeletion <- read.table(text=txt, header=TRUE)
gg <- ggplot(copuladeletion)
gg <- gg + geom_point(aes(Distribution, Type, colour=Family),
shape="|", size=10)
gg <- gg + scale_x_continuous(breaks=seq(0, 0.7, 0.1))
gg <- gg + scale_y_discrete(expand=c(0,0))
gg <- gg + scale_colour_brewer(name="", palette="Set1")
gg <- gg + facet_wrap(~Type, ncol=1, scales="free_y")
gg <- gg + guides(colour=guide_legend(override.aes=list(shape=15, size=3)))
gg <- gg + labs(x=NULL, y=NULL, title="Family Distribution by Type")
gg <- gg + theme_bw()
gg <- gg + theme(panel.grid.major=element_blank())
gg <- gg + theme(panel.grid.minor=element_blank())
gg <- gg + theme(strip.background=element_blank())
gg <- gg + theme(strip.text=element_blank())
gg <- gg + theme(axis.ticks=element_blank())
gg <- gg + theme(legend.key=element_blank())
gg <- gg + theme(legend.position="bottom")
gg
겹치는 부분을 약간 보완하기 위해 (Roman이 cpl 시간을 지적했듯이) 적절한 라인과 해킹 포인트를 사용할 수 있습니다.
gg <- ggplot(copuladeletion)
gg <- gg + geom_segment(aes(x=Distribution, xend=Distribution,
y=0, yend=1, colour=Family), size=0.25)
gg <- gg + scale_x_continuous(breaks=seq(0, 0.7, 0.1))
gg <- gg + scale_y_discrete(expand=c(0,0))
gg <- gg + scale_colour_brewer(name="", palette="Set1")
gg <- gg + facet_wrap(~Type, ncol=1, scales="free_y", switch="y")
gg <- gg + labs(x=NULL, y=NULL, title="Family Distribution by Type")
gg <- gg + guides(colour=guide_legend(override.aes=list(shape=15, size=3)))
gg <- gg + theme_bw()
gg <- gg + theme(panel.border=element_rect(color="#2b2b2b", size=0.15))
gg <- gg + theme(panel.grid.major=element_blank())
gg <- gg + theme(panel.grid.minor=element_blank())
gg <- gg + theme(strip.background=element_blank())
gg <- gg + theme(strip.text.y=element_text(angle=180))
gg <- gg + theme(axis.ticks=element_blank())
gg <- gg + theme(legend.key=element_blank())
gg <- gg + theme(legend.position="bottom")
gg
맵에 미학을 추가 할 수도 있습니다 linetype
(그리고 hjust
원하는대로 y 레이블도 추가 할 수 있습니다). 이 얇은 선은 읽기가 어렵지만 ( size
의지에 따라 조정 ) 스트립 차트가이 데이터에 대해 잘 작동한다고 생각합니다. 필요한 경우EX
별도의 플롯에서 스트립 을 "축소"할 수 있습니다 (이 데이터가 실제로 무슨 말을 하려는지 모르겠습니다 :-)
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다