Use * instead of ~ XX <- 5 YY <- 10 plot(1:10) mtext(side=3, bquote(N <= .(XX) ~":" ~ .(YY))) mtext(side=1, bquote(N <= .(XX) *":" * .(YY)))
> On Jun 7, 2023, at 22:14, Dennis Fisher <fis...@plessthan.com> wrote: > > R 4.2.3 > OS X > > Colleagues > > This should be easy -- but not for me. > > I want to plot text similar to this: > N ≥ XX: YY > > where XX can be either 1 or 50 and YY is an integer > > I envision that there would be two solutions: > > UNICODE: If I can generate "≥" via unicode, the problem is solved: > mtext(side=3, paste0("N ", UNICODE, " ", XX, ": ", YY)) > > 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 ":" > > Dennis > > > > Dennis Fisher MD > P < (The "P Less Than" Company) > Phone / Fax: 1-866-PLessThan (1-866-753-7784) > http://www.plessthan.com/ > > ______________________________________________ > R-help@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@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.