[R] Help labeling Panels

MTHarden mitch.harden at gmail.com
Sun Mar 27 18:17:30 CEST 2011


Hi,

I'm new. I tried to search out this answer but I suspect I was using the
wrong terms, or simply not understanding some of the answers. Anyway here is
my question:

I want to have a  2x2 panel figure with 4 line graphs all in the same scale.
Actually I have that. The thing I seem to be lacking is a way to Label each
panel with a letter. I want it to look something like this:

http://www.nature.com/npp/journal/v31/n9/images/1301015f3.gif

I am using linux and I'm not even entirely sure if I've done this in a best
practices sort of way but here is the code that I've entered so far to make
my figure:


library(sciplot)
postscript('PreferenceGraph2x2.eps')
par(mfrow = c(2,2), pin=c(6.45669292,6.45669292), pty="m")
lineplot.CI(Week, Pref, group = Drug, data=SM.long, xlab = "Week", ylab
="Proportion Sucrose of Total Fluids", x.leg =1, y.leg=.91, leg.lab=
c("Salvia","Control"),col =c("red","darkgreen"),ylim=c(0.48,.95), main =
"Preference of Stressed Males")
lineplot.CI(Week, Pref, group = Drug, data=SF.long, xlab = "Week", ylab
="Proportion Sucrose of Total Fluids", x.leg =1, y.leg=.60, leg.lab=
c("Salvia","Control"),col =c("red","darkgreen"),ylim=c(0.48,.95), main =
"Preference of Stressed Females")
lineplot.CI(Week, Pref, group = Drug, data=NSM.long, xlab = "Week", ylab
="Proportion Sucrose of Total Fluids", x.leg =1, y.leg=.64, leg.lab=
c("Salvia","Control"),col =c("red","darkgreen"),ylim=c(0.48,.95), main =
"Preference of Non-Stressed Males")
lineplot.CI(Week, Pref, group = Drug, data=NSF.long, xlab = "Week", ylab
="Proportion Sucrose of Total Fluids", x.leg =1, y.leg=.64, leg.lab=
c("Salvia","Control"),col =c("red","darkgreen"),ylim=c(0.48,.95), main =
"Preference of Non-Stressed Females")
dev.off()


Thanks in advanced for any help you might give!


--
View this message in context: http://r.789695.n4.nabble.com/Help-labeling-Panels-tp3409528p3409528.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list