我正在尝试在每个虚拟变量上加上一条线,但不确定如何做?谁能指出我正确的方向?
# label points by ’type’ on scatterplot
> plot(education, prestige, pch=as.numeric(type), col=as.numeric(type))
# add a legend to the above plot
> legend(8,95, levels(type), pch=1:3, col=1:3)