Hi, I would like to place a line (tilted at an angle) in the margin of an R plot. Is there any way to place such an annotation outside the plotting area? As an alternative, being able to plot a rotated character (the pipe, |) in the margin would be sufficient. The problem is that mtext doesn't work with the srt option. As a further alternative, if I could put a legend in the margin, I could use the text command within the legend, and then srt would work (I've checked, and text("|",srt=x) seems to work for various values of x besides multiples of 90). But I don't know how to put a legend in the margin either. Does anyone see how to make any of these approaches work? Or perhaps there is yet another alternative? Thanks, Chris Adolph Dept. of Government Harvard University -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Chris Adolph wrote:> Hi, > > I would like to place a line (tilted at an angle) in the margin of an > R plot. Is there any way to place such an annotation outside the > plotting area? > > As an alternative, being able to plot a rotated character (the pipe, > |) in the margin would be sufficient. The problem is that mtext > doesn't work with the srt option. > > As a further alternative, if I could put a legend in the margin, I > could use the text command within the legend, and then srt would work > (I've checked, and text("|",srt=x) seems to work for various values > of x besides multiples of 90). But I don't know how to put a legend > in the margin either. > > Does anyone see how to make any of these approaches work? Or perhaps > there is yet another alternative?Take a look at this post by Paul Murrell just a few days ago. He provides some example code to do this. http://www.r-project.org/nocvs/mail/r-help/2002/9299.html Gregory Warnes provides a different approach in the same thread here: http://www.r-project.org/nocvs/mail/r-help/2002/9305.html HTH, Marc Schwartz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._