[R] Additional polymath query

David Winsemius dwinsemius at comcast.net
Sat Jan 2 18:53:37 CET 2016


> On Jan 2, 2016, at 8:52 AM, Fisher Dennis <fisher at plessthan.com> wrote:
> 
> R 3.2
> OS X
> 
> Colleagues
> 
> Yesterday, I asked:
> 	I have a polymath label for a graphic:
> 		bquote(AUC[0-infinity]~(ng/ml~x~hours))
> 	I would like the “x” to be replaced with a bullet.  
> 
> David Winsemius provided an answer:
> 	%.%
> (which is also known as “cdot”)
> 
> That works but the dot is small — I would prefer something bolder.  
> Further searching led to the following:
> 	plot(1, xlab="\u25CF") 
> 
> Now I can’t figure out how to incorporate
> 	\u25CF
> into the original command (to replace the “x” below):
> 	bquote(AUC[0-infinity]~(ng/ml~x~hours))
> 
> As much as I enjoy plotmath, it remains a bit of a mystery to me.  Any advice would be appreciated.

The `?plotmath` help page also refers you to the help page on `?points`. I have on several occasions used the last example on that page to create an annotated table of glyphs associated with the Symbol font "characters" in the higher ranges of values:

pdf(); TestChars <- function(sign = 1, font = 1, ...)
{
   MB <- l10n_info()$MBCS
   r <- if(font == 5) { sign <- 1; c(32:126, 160:254)
       } else if(MB) 32:126 else 32:255
   if (sign == -1) r <- c(32:126, 160:255)
   par(pty = "s")
   plot(c(-1,16), c(-1,16), type = "n", xlab = "", ylab = "",
        xaxs = "i", yaxs = "i",
        main = paste( "Mac Symbol: points example", sprintf("sign = %d, font = %d", sign, font)))
   grid(17, 17, lty = 1) ; mtext(paste("MBCS:", MB))
   for(i in r) {
         try(points(i%%16, i%/%16, pch = sign*i, font = font,...))
         try(text(i%%16 -.3, i%/%16-.3, labels = i,cex=.6)) }
}

TestChars(font = 5); dev.off()

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplots.pdf
Type: application/pdf
Size: 7945 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20160102/b561edaf/attachment.pdf>
-------------- next part --------------


Looks to me that the 183 glyph might be to your liking. `points` has a 'cex' parameter that could be used to embolden it further if needed.

-- 
David.

> 
> Dennis
> 
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone: 1-866-PLessThan (1-866-753-7784)
> Fax: 1-866-PLessThan (1-866-753-7784)
> www.PLessThan.com
> 
> ______________________________________________
> 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.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list