0

从 .csv 开始,我想突出显示蜂群图中的一个点。

library("beeswarm")

#carico dati
library(readr)
lavororadar <- read_delim("lavororadar.csv", 
                          ";", escape_double = FALSE, trim_ws = TRUE)
View(lavororadar)

# Beeswarm not penalty goal
beeswarm(lavororadar$npgoal, col=?????, pch=19, method="swarm", cex=0.5)
4

1 回答 1

0

您可以使用参数设置各个点的颜色pwcol。这是一个例子......

beeswarm(rnorm(200),                #some random data
         pwcol = c(1, rep(2, 199)), #first element is colour 1, rest are colour 2
         pch=19, 
         method="swarm", 
         cex=0.5)

所以你只需要设置一个合适的颜色向量来适应你的数据。

于 2019-07-21T11:04:53.413 回答