Hi everyone,

I have a problem with achieving the following: I have a plot that I'm very happy with and I'd like to add some label text at certain positions. I use rpy2 and ggplot2. My problem is basically that for the geom_text I would like to specifiy a different aes_string so that I can change the y positions.

If that's not possible can I somehow push a complete layer to the grDevice and then add a second layer on top?

For reference, here's the code that I use:

dataf = r_objects.DataFrame(data)
# plot
gp = ggplot2.ggplot(dataf)
plot_title = "Uniform Random Dynamic Value"
pp = gp +\
ggplot2.aes_string(x="xpos", y="dynamic", ymin="min", ymax="max", colour="factor(scheme)", label="label") +\
ggplot2.geom_errorbar(position="dodge") +\
ggplot2.geom_line() +\
ggplot2.facet_grid(r_objects.Formula("mpos ~ .")) +\
ggplot2.scale_x_continuous("Motif") +\
ggplot2.scale_y_continuous("Dynamic Value") +\
ggplot2.geom_text(colour="black") +\
ggplot2.opts(title=plot_title)
pp.plot()

TIA,
Moritz
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to