[R] Example of the use of the "crt" graphical parameter?

William Dunlap wdunlap at tibco.com
Tue May 2 00:28:30 CEST 2017


Perhaps R does what S+ does with par("crt").  S+'s help(par) says:

   crt=x
         character rotation in degrees measured counterclockwise from
horizontal.
         When srt is set, crt is automatically set to the same value,
unless crt
         appears later in the command than srt. Many graphics devices
ignore crt
         and use only srt, so setting them to different values has no
effect on those
         devices. A few graphics devices cannot rotate text, or can rotate
it only at
         multiples of 90 degrees.

"Many graphics devices" means "most modern graphics devices", where "modern"
means post 1990 or so, when pen plotters went out of fashion.


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Mon, May 1, 2017 at 3:20 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:

> FWIW:
>
> "srt = 90" should rotate the whole string "aaaaaa" 90 degrees in a
> call to text(), and it does.
>
> I interpret "crt =90" to rotate the individual letters of "aaaaaa" 90
> degrees, but it does not on my graphic device, RStudioGD.  It probably
> works on some other devices, but I don't know which ones.
>
> HTH.
>
> Cheers,
> Bert
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Mon, May 1, 2017 at 2:08 PM, Bert Gunter <bgunter.4567 at gmail.com>
> wrote:
> > Hard to know what you want or did without code.
> >
> > But, a guess: did you want the "srt" parameter and not  "crt"?
> >
> > Of course, it's always useful to read the man page, in this case for
> > ?par, where it says:
> >
> > (for crt):  "A numerical value specifying (in degrees) how **single
> > characters** should be rotated. It is unwise to expect values other
> > than multiples of 90 to work. Compare with srt which does string
> > rotation." [note: "string" = several characters = text]
> >
> >
> > Cheers,
> > Bert
> >
> > Bert Gunter
> >
> > "The trouble with having an open mind is that people keep coming along
> > and sticking things into it."
> > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> >
> >
> > On Mon, May 1, 2017 at 1:57 PM, Michael Hannon
> > <jmhannon.ucdavis at gmail.com> wrote:
> >> Hi, folks.  This is an issue that we've defined away, but I recently
> >> thought it would be useful to rotate characters in some marginal text
> >> in a base-R plot.  I made a few stabs on using the "crt" parameter but
> >> was unsuccessful.
> >>
> >> I'm deliberately omitting details of my attempts, as I want just to
> >> focus on the following: if you know of any working example of the use
> >> of that parameter. will you please send me a link to it?  Thanks.
> >>
> >> (Note that there are *many* links to Cathode Ray Tubes,)
> >>
> >> -- Mike
> >>
> >> ______________________________________________
> >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> 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.
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list