The used data looks as follows
benchmark IPC dl1.mpki dl2.mpki dl3.mpki
1 400.perlbench 1.8233 11.7052 0.1550 0.0564
2 401.bzip2 1.1567 64.4849 12.8893 10.8238
3 403.gcc 1.5815 14.9741 2.0674 0.3860
4 410.bwaves 2.0622 54.4960 2.2584 2.9829
5 416.gamess 2.5907 1.2177 0.0018 0.0012
but includes up to 50 rows. With:
ggplot(data, aes(IPC, dl1.mpki)) + geom_text(aes(label=1:27), size =
3, angle=60)
It shows an ID in every point but I'm unable to generate a legend
like:
1 400.perlbench
2 401.bzip2
Any idea would be really appreciated.
Thanks in advance for your help,
Darío
maybe I cannot understand what you want to do, but please try:
ggplot(data[1:5,], aes(IPC,
dl1.mpki))+geom_text(aes(label=paste(1:5,d$benchmark)),size=3,angle=60)
HTH.
2010/3/23 Darío Suárez Gracia <dariosua...@gmail.com>:
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> To post to this group, send email to ggp...@googlegroups.com
> To unsubscribe from this group, send email to
> ggplot2+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ggplot2
>
> To unsubscribe from this group, send email to ggplot2+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
>
If I understand you correctly, you want to use numbers or letters to
annotate data points on the plot, and then use legend to explain the
meaning of the number or letters?
df <- data.frame(x=rnorm(5), y=rnorm(5), name=paste('name', letters[1:5]))
qplot(x,y, data=df) +
geom_point(aes(x+0.06, shape=name), size=3) +
scale_shape_manual(values = as.character(as.numeric(df$name)))
Or if you have more than 10 data points, replace the last statement with
scale_shape_manual(values = letters[df$name])
I am not sure how to make this (annotation + legend) work for more
than 36 data points, but isn't a 37-row legend too big for a plot?
Xie Chao
2010/3/24 takahashi kohske <takahash...@gmail.com>:
Best regards,
Darío