做散点图,基于列的阶乘值的数字分布
Doing scatterplots, numeric distribution based on factorial value of a column
我这里有一些数据,我想为其制作散点图。
Filename Consonant V1.dn C2.dn V2.dn
1 AK_baagge.TextGrid Geminate 15.799430 11.422561 12.917102
2 AK_baagi.TextGrid Singleton 15.873483 15.103859 10.125358
3 AK_boli.TextGrid Singleton 15.516522 7.989851 16.906061
4 AK_bolli.TextGrid Geminate 12.239975 12.350245 12.543218
5 AK_buute.TextGrid Singleton 12.807359 10.062925 14.141459
6 AK_buutte.TextGrid Geminate 13.920380 22.792710 15.604265
7 AK_chaakki.TextGrid Geminate 12.182685 18.074965 9.077295
8 AK_gaana.TextGrid Singleton 15.362712 5.532339 15.252506
9 AK_gaanna.TextGrid Geminate 11.991611 12.869568 12.227161
10 AK_jaaddi.TextGrid Geminate 11.771755 14.523685 12.019280
11 AK_jaadi.TextGrid Singleton 16.245574 9.477126 12.433014
12 AK_khaane.TextGrid Singleton 14.212490 6.843051 12.272372
13 AK_khaanne.TextGrid Geminate 9.257361 13.257455 9.714515
16 AK_saami.TextGrid Singleton 15.202102 8.443779 10.259451
17 AK_topa.TextGrid Singleton 10.041053 15.404328 14.443669
18 AK_toppa.TextGrid Geminate 11.598586 12.701031 19.018746
19 DS_baagge.TextGrid Geminate 11.274895 12.771750 10.222571
20 DS_baagi.TextGrid Singleton 11.612519 13.455866 7.524220
21 DS_boli.TextGrid Singleton 9.545193 6.328078 11.476345
22 DS_bolli.TextGrid Geminate 10.285957 11.655632 12.626671
25 DS_chaakki.TextGrid Geminate 9.997374 18.529020 6.859331
26 DS_chaaku.TextGrid Singleton 9.786320 17.808986 5.777550
27 DS_gaana.TextGrid Singleton 10.602730 4.301289 11.286482
28 DS_gaanna.TextGrid Geminate 10.698212 12.289987 12.931633
29 DS_jaaddi.TextGrid Geminate 11.728001 13.249137 7.776028
30 DS_jaadi.TextGrid Singleton 13.573731 6.181932 9.115517
我应该如何编码才能制作像此处所附的那样的散点图?
图片中的元音持续时间和辅音持续时间可以分别与所提供数据中的 'V1.dn' 和 'C2.dn' 列同义。
我试过了,
plot(x= a $C2.dn, y= a $V1.dn, xlab= V1.dn, ylab = C2.dn)
但它没有给我一个合理的结果(由于缺少 'Consonant' 类型)
在方差方面,可以这样想象:
anova1<- aov (V1.dn ~ Consonant, data = a)
PS我知道,这里不鼓励发图片,但预期的情节是
从别处转载(Zirak 和 Skaer,2014)。
以下是使用 {ggplot2} 的潜在绘图解决方案。如果您想将每个点的颜色或透明度映射到一些其他变量,例如与您共享的图像相似的 V2.dn
,您可以在 aes()
的 aes()
中添加 alpha = V2.dn
14=].
library(tidyverse)
a <- read.table(header = T, text = "Filename Consonant V1.dn C2.dn V2.dn
1 AK_baagge.TextGrid Geminate 15.799430 11.422561 12.917102
2 AK_baagi.TextGrid Singleton 15.873483 15.103859 10.125358
3 AK_boli.TextGrid Singleton 15.516522 7.989851 16.906061
4 AK_bolli.TextGrid Geminate 12.239975 12.350245 12.543218
5 AK_buute.TextGrid Singleton 12.807359 10.062925 14.141459
6 AK_buutte.TextGrid Geminate 13.920380 22.792710 15.604265
7 AK_chaakki.TextGrid Geminate 12.182685 18.074965 9.077295
8 AK_gaana.TextGrid Singleton 15.362712 5.532339 15.252506
9 AK_gaanna.TextGrid Geminate 11.991611 12.869568 12.227161
10 AK_jaaddi.TextGrid Geminate 11.771755 14.523685 12.019280
11 AK_jaadi.TextGrid Singleton 16.245574 9.477126 12.433014
12 AK_khaane.TextGrid Singleton 14.212490 6.843051 12.272372
13 AK_khaanne.TextGrid Geminate 9.257361 13.257455 9.714515
16 AK_saami.TextGrid Singleton 15.202102 8.443779 10.259451
17 AK_topa.TextGrid Singleton 10.041053 15.404328 14.443669
18 AK_toppa.TextGrid Geminate 11.598586 12.701031 19.018746
19 DS_baagge.TextGrid Geminate 11.274895 12.771750 10.222571
20 DS_baagi.TextGrid Singleton 11.612519 13.455866 7.524220
21 DS_boli.TextGrid Singleton 9.545193 6.328078 11.476345
22 DS_bolli.TextGrid Geminate 10.285957 11.655632 12.626671
25 DS_chaakki.TextGrid Geminate 9.997374 18.529020 6.859331
26 DS_chaaku.TextGrid Singleton 9.786320 17.808986 5.777550
27 DS_gaana.TextGrid Singleton 10.602730 4.301289 11.286482
28 DS_gaanna.TextGrid Geminate 10.698212 12.289987 12.931633
29 DS_jaaddi.TextGrid Geminate 11.728001 13.249137 7.776028
30 DS_jaadi.TextGrid Singleton 13.573731 6.181932 9.115517")
a %>%
ggplot(aes(x = C2.dn, y = V1.dn)) +
geom_point(aes(shape = Consonant)) +
theme_bw()
由 reprex package (v1.0.0)
于 2021 年 3 月 15 日创建
我这里有一些数据,我想为其制作散点图。
Filename Consonant V1.dn C2.dn V2.dn
1 AK_baagge.TextGrid Geminate 15.799430 11.422561 12.917102
2 AK_baagi.TextGrid Singleton 15.873483 15.103859 10.125358
3 AK_boli.TextGrid Singleton 15.516522 7.989851 16.906061
4 AK_bolli.TextGrid Geminate 12.239975 12.350245 12.543218
5 AK_buute.TextGrid Singleton 12.807359 10.062925 14.141459
6 AK_buutte.TextGrid Geminate 13.920380 22.792710 15.604265
7 AK_chaakki.TextGrid Geminate 12.182685 18.074965 9.077295
8 AK_gaana.TextGrid Singleton 15.362712 5.532339 15.252506
9 AK_gaanna.TextGrid Geminate 11.991611 12.869568 12.227161
10 AK_jaaddi.TextGrid Geminate 11.771755 14.523685 12.019280
11 AK_jaadi.TextGrid Singleton 16.245574 9.477126 12.433014
12 AK_khaane.TextGrid Singleton 14.212490 6.843051 12.272372
13 AK_khaanne.TextGrid Geminate 9.257361 13.257455 9.714515
16 AK_saami.TextGrid Singleton 15.202102 8.443779 10.259451
17 AK_topa.TextGrid Singleton 10.041053 15.404328 14.443669
18 AK_toppa.TextGrid Geminate 11.598586 12.701031 19.018746
19 DS_baagge.TextGrid Geminate 11.274895 12.771750 10.222571
20 DS_baagi.TextGrid Singleton 11.612519 13.455866 7.524220
21 DS_boli.TextGrid Singleton 9.545193 6.328078 11.476345
22 DS_bolli.TextGrid Geminate 10.285957 11.655632 12.626671
25 DS_chaakki.TextGrid Geminate 9.997374 18.529020 6.859331
26 DS_chaaku.TextGrid Singleton 9.786320 17.808986 5.777550
27 DS_gaana.TextGrid Singleton 10.602730 4.301289 11.286482
28 DS_gaanna.TextGrid Geminate 10.698212 12.289987 12.931633
29 DS_jaaddi.TextGrid Geminate 11.728001 13.249137 7.776028
30 DS_jaadi.TextGrid Singleton 13.573731 6.181932 9.115517
我应该如何编码才能制作像此处所附的那样的散点图?
图片中的元音持续时间和辅音持续时间可以分别与所提供数据中的 'V1.dn' 和 'C2.dn' 列同义。
我试过了,
plot(x= a $C2.dn, y= a $V1.dn, xlab= V1.dn, ylab = C2.dn)
但它没有给我一个合理的结果(由于缺少 'Consonant' 类型)
在方差方面,可以这样想象:
anova1<- aov (V1.dn ~ Consonant, data = a)
PS我知道,这里不鼓励发图片,但预期的情节是 从别处转载(Zirak 和 Skaer,2014)。
以下是使用 {ggplot2} 的潜在绘图解决方案。如果您想将每个点的颜色或透明度映射到一些其他变量,例如与您共享的图像相似的 V2.dn
,您可以在 aes()
的 aes()
中添加 alpha = V2.dn
14=].
library(tidyverse)
a <- read.table(header = T, text = "Filename Consonant V1.dn C2.dn V2.dn
1 AK_baagge.TextGrid Geminate 15.799430 11.422561 12.917102
2 AK_baagi.TextGrid Singleton 15.873483 15.103859 10.125358
3 AK_boli.TextGrid Singleton 15.516522 7.989851 16.906061
4 AK_bolli.TextGrid Geminate 12.239975 12.350245 12.543218
5 AK_buute.TextGrid Singleton 12.807359 10.062925 14.141459
6 AK_buutte.TextGrid Geminate 13.920380 22.792710 15.604265
7 AK_chaakki.TextGrid Geminate 12.182685 18.074965 9.077295
8 AK_gaana.TextGrid Singleton 15.362712 5.532339 15.252506
9 AK_gaanna.TextGrid Geminate 11.991611 12.869568 12.227161
10 AK_jaaddi.TextGrid Geminate 11.771755 14.523685 12.019280
11 AK_jaadi.TextGrid Singleton 16.245574 9.477126 12.433014
12 AK_khaane.TextGrid Singleton 14.212490 6.843051 12.272372
13 AK_khaanne.TextGrid Geminate 9.257361 13.257455 9.714515
16 AK_saami.TextGrid Singleton 15.202102 8.443779 10.259451
17 AK_topa.TextGrid Singleton 10.041053 15.404328 14.443669
18 AK_toppa.TextGrid Geminate 11.598586 12.701031 19.018746
19 DS_baagge.TextGrid Geminate 11.274895 12.771750 10.222571
20 DS_baagi.TextGrid Singleton 11.612519 13.455866 7.524220
21 DS_boli.TextGrid Singleton 9.545193 6.328078 11.476345
22 DS_bolli.TextGrid Geminate 10.285957 11.655632 12.626671
25 DS_chaakki.TextGrid Geminate 9.997374 18.529020 6.859331
26 DS_chaaku.TextGrid Singleton 9.786320 17.808986 5.777550
27 DS_gaana.TextGrid Singleton 10.602730 4.301289 11.286482
28 DS_gaanna.TextGrid Geminate 10.698212 12.289987 12.931633
29 DS_jaaddi.TextGrid Geminate 11.728001 13.249137 7.776028
30 DS_jaadi.TextGrid Singleton 13.573731 6.181932 9.115517")
a %>%
ggplot(aes(x = C2.dn, y = V1.dn)) +
geom_point(aes(shape = Consonant)) +
theme_bw()
由 reprex package (v1.0.0)
于 2021 年 3 月 15 日创建