plot(1:4,dbinom(1:4,4,0.7),
type='h',
main='Binominal Distribution (n=4, p=0.7',
ylab='Probability',
xlab='# Successes',
lwd=3,xaxt="n")
This should work:
y <- dbinom(1:4,4,0.7)
plot(1:4,y,
type='h',
col = ifelse(y == max(y), "red", "black"),
main='Binominal Distribution (n=4, p=0.7',
ylab='Probability',
xlab='# Successes',
lwd=3,xaxt="n")