Skip to content
Prev 215793 / 398498 Next

dot plot

Hi,

It might be too late but I'll answer anyway.
First, don't forget to follow the posting guide and provide some sample 
data, your code, and/or exactly what you're looking for. And as Jannis 
said, search also the archive.

Here are some thoughts about what you can do (if I understand you well):
df <- data.frame(cat=1:10, num1=rnorm(10), num2=rnorm(10))    #sample 
dataframe
plot(df$num1, type="n", xlim=c(1,10), ylim=c(-1,1), xlab="categories", 
ylab="random numbers")         #create a blank plot
points(df$num1, type="p", pch=1, col="red")    #plot "num1"
points(df$num2, type="p", pch=2, col="green")   #plot "num2"
legend(x="topright", legend=c("num1", "num2"), pch=1:2, col=c("red", 
"green"))    #add a legend

HTH,
Ivan



Le 3/31/2010 19:42, Jannis a ?crit :