I have the following dataset
SIZE ALG1 ALG2 ALG3
A 2 3 5
A 3 2 1
A 1 2 2
B 10 10 11
B 12 12 12
I'd like a plot having as a horizontal axis the SIZE column and as Y values the series ALG1 ALG2 ALG3.
How can I get it wit Excel (actually OOCALC) or R?
In general I get the SIZE values repeated on the x-axis, which appears then much longer.
Best How To :
Suppose your data frame is called
You have to convert it in a long format using
melt(df1) -> dfmelt
ggplot(data=dfmelt, aes(x=SIZE, y=value)) + geom_jitter(aes(color=variable))
or, more simply and quickly:
qplot(data=dfmelt, x=SIZE, y=value, geom="jitter", color=variable)
If you just want the points without "jittering" them:
qplot(data=dfmelt, x=SIZE, y=value, geom="point", color=variable)