Michael Hannon
2017-May-01 20:57 UTC
[R] Example of the use of the "crt" graphical parameter?
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
Bert Gunter
2017-May-01 21:08 UTC
[R] Example of the use of the "crt" graphical parameter?
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.
Michael Hannon
2017-May-01 21:47 UTC
[R] Example of the use of the "crt" graphical parameter?
Thanks, Bert. I *did* mean crt, and I did read (and re-read) the man page. What I'm lacking, and the only thing I'm asking for, is a working example of the use of that parameter. -- Mike 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.
Bert Gunter
2017-May-01 22:20 UTC
[R] Example of the use of the "crt" graphical parameter?
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.
Hi Michael, The arctext function (plotrix) does something similar, and the code could be modified to do what you request. If you do want a working function, it wouldn't be too hard to program. Jim On Tue, May 2, 2017 at 6:57 AM, 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.
Michael Hannon
2017-May-02 04:03 UTC
[R] Example of the use of the "crt" graphical parameter?
Bendy like spaghetti :-) Thanks, Jim. I wasn't aware of plotrix, and it does seem to be a cornucopia of useful, graphical stuff. In this case, my quest for rotating characters stemmed from what you might call a PHB request that I was eventually able to work around. I posed my original question here just out of curiosity (and frustration, I guess). -- Mike On Mon, May 1, 2017 at 5:23 PM, Jim Lemon <drjimlemon at gmail.com> wrote:> Hi Michael, > The arctext function (plotrix) does something similar, and the code > could be modified to do what you request. If you do want a working > function, it wouldn't be too hard to program. > > Jim > > > On Tue, May 2, 2017 at 6:57 AM, 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.