Я могу построить график рассеяния и покрасить точки на основе одного критерия, т.е. я могу покрасить все точки >= 3 как красные, а остальные - как черные. Я хотел бы иметь возможность окраски очков таким образом:
-
= 3 цвет красный
- <= 1 цвет синий
- Остальные как черные
Код, который у меня ниже, завершает шаги 1 и 3, но я не уверен, как включить второй аргумент шага 2
data<- read.table('sample_data.txtt', header=TRUE, row.name=1)
pos<- data$col_name1
cn<- data$col_name2
plot(pos,cn, ylim=c(0,5), col="blue")
plot(pos,cn, col=ifelse(cn>=3,"red","black"), ylim=c(0,10))
Любая помощь будет отличной!!! Спасибо заранее