Re: [R] rotate text using mtext

From: Chuck Cleland <ccleland_at_optonline.net>
Date: Wed 28 Jun 2006 - 05:22:28 EST

Rashmi Mathur wrote:
> Hello,
>
> I wish to write a label to the right-hand side of a plot (side=4) using
> mtext, with the text facing inwards - that is, rotated 180 degrees from the
> default orientation. How might I do this? (I've tried experimenting with
> las but no luck.)

   Use text() instead. I'm not sure how you want the label oriented, but this should get you started:

df <- data.frame(cbind(1:10, 11:20))
names(df) <- c("y","x")

par(mar = c(7, 7, 7, 10))
plot(y ~ x, data = df, ylab = "", xlab = "independent") text(par("usr")[2] + 0.25, 5.5, srt=-45, adj = 0, labels = "dependent", xpd = TRUE)

> Thanks,
> Rashmi
>
>
> Rashmi Mathur
> Master's Candidate
> Fisheries Science and Management Research Group
> School of Resource and Environmental Management (REM)
> Simon Fraser University
> Burnaby, BC
> rashmim@sfu.ca
> http://www.rem.sfu.ca/fishgrp
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Jun 28 05:34:34 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 28 Jun 2006 - 06:12:51 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.