[R] need help with plotmath and/or plotting unicode characters

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Thu Jun 8 11:04:45 CEST 2023


On Wed, 7 Jun 2023 19:14:58 -0700
Dennis Fisher <fisher using plessthan.com> wrote:

> UNICODE: If I can generate "≥" via unicode, the problem is solved:
> 	mtext(side=3, paste0("N ", UNICODE, " ", XX, ": ", YY))

It should be possible to just copy & paste "≥" in the R source code
nowadays. If for some reason the script has to stay ASCII-encoded, use
'\u2265'.

> PLOTMATH:
> 	mtext(side=3, bquote(N <= .(XX) ~":" ~ .(YY)))
> This comes close:
> 	N ≤ 2 : 13
> but I want to remove the space between the 2 and ":"

Use paste(.(XX), ":") or even just .(XX) * ":" to output them close
together.

-- 
Best regards,
Ivan



More information about the R-help mailing list