[R] Changing mtext direction, or using text for the margin?

Michael Rennie mdrennie at gmail.com
Mon Jan 7 20:27:45 CET 2013


HA! Works perfectly!!! Thanks so much ilai.

ilai wrote:
>
> On Mon, Jan 7, 2013 at 11:52 AM, David Winsemius 
> <dwinsemius at comcast.net <mailto:dwinsemius at comcast.net>> wrote:
>
>
>     If you are going that route you may want to look at the gridBase
>     package.
>
> Yes for mixing base and grid graphics but IMHO overkill here. 
> Replacing the last mtext line with
>
> grid::grid.text('dependent B', 0.985 , 0.5 , rot = 270)
>
> should take care of it (leaving exact placement and justification to 
> the OP)
>
> cheers
>
>     -- 
>     David.
>
>         Mike
>
>         David Winsemius wrote:
>
>
>             On Jan 7, 2013, at 8:06 AM, Michael Rennie wrote:
>
>
>                 Any thoughts on what that dirty hack might be or any
>                 leads on where to start? Perhaps a whole new plot
>                 region in the margin or something? Is that even
>                 possible? I'm having a difficult time imagining how I
>                 can do this.
>
>
>             The `text` function accepts the 'xpd' argument for `par`.
>
>             ?par
>             ?text
>
>             (Similar but not exactly the same as R-FAQ "7.27 How can I
>             create rotated axis labels?")
>
>             I'm not sure what sort of "dirt" Uwe was expecting, but
>             I'm guessing he meant that you probably were not going to
>             be getting exactly what you wanted with the first attempt
>             and were going to need to adjust the locations "by hand"
>             after digging around in the par documentation.
>
>
>
>     David Winsemius, MD
>     Alameda, CA, USA
>
>     ______________________________________________
>     R-help at r-project.org <mailto:R-help at r-project.org> mailing list
>     https://stat.ethz.ch/mailman/listinfo/r-help
>     PLEASE do read the posting guide
>     http://www.R-project.org/posting-guide.html
>     and provide commented, minimal, self-contained, reproducible code.
>
>




More information about the R-help mailing list