[R] Plotmath isn't working for special characters

Shawn Way @w@y @end|ng |rom empowerph@rm@cy@com
Wed Jan 25 15:48:32 CET 2023


I see the same thing using 4.2.2 on Windows 10.


Thank you kindly,
Shawn Way, PE   Director of Engineering
Phone: (832) 403-0414
Empower Pharmacy   Expanding Access.
      

-----Original Message-----
From: R-help <r-help-bounces using r-project.org> On Behalf Of David Stevens
Sent: Wednesday, January 25, 2023 8:34 AM
To: Bert Gunter <bgunter.4567 using gmail.com>
Cc: r-help using r-project.org
Subject: Re: [R] Plotmath isn't working for special characters

External Email: This message originated from outside Empower Pharmacy. Please exercise caution before opening attachments, clicking links, replying, or providing information to the sender.


A more extensive test (no=produced an empty box on the plot, yes=produced the intended plotmath result). It appears that plotmath is not producing the special math characters. Greek symbols are produced. I'll try to reinstall R and report back.

David

plot(1,1, main = parse(text = "x >= y")) - no plot(1,1, main = parse(text = "x == y")) - yes plot(1,1, main = parse(text = "x <= y")) - no plot(1,1, main = parse(text = "x ~ y")) - yes plot(1,1, main = parse(text = "x * y")) - yes plot(1,1, main = parse(text = "x %~~% y")) - no

plot(1,1, main = bquote(x %~~% y)) - no
plot(1,1, main = bquote(x  %prop% y)) - no

plot(1,1, main = expression(x  %prop% y)) - no plot(1,1, main = expression(x == y)) - yes plot(1,1, main = expression(x %+-% y)) - no plot(1,1, main = expression(integral(f(x)*dx, a, b))) - no plot(1,1, main = expression(sum(x[i], i==1, n))) - no plot(1,1, main = expression(x^(y + z))) - yes plot(1,1, main = expression(inf(x))) - no plot(1,1, main = expression(x[(y + z)])) - yes

David K Stevens, PhD, PE, Professor
Civil and Environmental Engineering
Utah Water Research Laboratory
Utah State University
8200 Old Main Hill
Logan, UT 84322-8200
david.stevens using usu.edu<mailto:david.stevens using usu.edu>
(435) 797-3229 (office)

On 1/24/2023 3:33 PM, Bert Gunter wrote:
Also works for me on a Mac Ventura in the RStudio graphics device. Just for the heckuva it, does plot(1,1,main= quote( x >= y )) work? I shouldn't think so, but ...

Cheers,
Bert



On Tue, Jan 24, 2023 at 1:43 PM David Stevens <david.stevens using usu.edu<mailto:david.stevens using usu.edu>> wrote:
Simple expressions on plots, such as parse(text='x >= y') have been resulting in just a placeholder box (x box y and not the symbol) in my R plot labels in windows, R v 4.2.2. I haven't down an exhaustive test but <= and >= have this behavior.

plot(1,1,main=parse(text="x >= y"))

Has anyone else seen this?

best

David

--
David K Stevens, PhD, PE, Professor
Civil and Environmental Engineering
Utah Water Research Laboratory
Utah State University
8200 Old Main Hill
Logan, UT 84322-8200
david.stevens using usu.edu<mailto:david.stevens using usu.edu>
(435) 797-3229 (office)

______________________________________________
R-help using r-project.org<mailto:R-help using 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]]

______________________________________________
R-help using 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.



More information about the R-help mailing list