[R] Plotmath isn't working for special characters

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Wed Jan 25 13:36:12 CET 2023


Às 21:53 de 24/01/2023, Spencer Graves escreveu:
> 
> 
> On 1/24/23 3:33 PM, David Stevens 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?
> 
> 
>        What's your "sessionInfo()"?
> 
> 
>        I got the symbol, not problem.  Spencer Graves
> 
> 
> sessionInfo()
> R version 4.2.2 (2022-10-31)
> Platform: x86_64-apple-darwin17.0 (64-bit)
> Running under: macOS Big Sur 11.7.2
> 
> Matrix products: default
> LAPACK: 
> /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods
> [7] base
> 
> loaded via a namespace (and not attached):
> [1] compiler_4.2.2  tools_4.2.2     rstudioapi_0.14
> [4] remotes_2.4.2
>  > >
>> best
>>
>> David
>>
> 
> ______________________________________________
> 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.
Hello,

I can reproduce the problem in RGui, R 4.2.2 on Windows 11.
Any of the following solved it.


plot(1,1, main=bquote(x~"\u2265"~y))
plot(1,1, main=expression(x~"\u2265"~y))


Hope this helps,

Rui Barradas



More information about the R-help mailing list