Plot colour based on conditional

colorcond(x) = x<0 ? :red : :green
x = randn(50)
plot(x; color=colorcond.(x))