[R-SIG-Mac] text() does not work

David Winsemius dwinsemius at comcast.net
Fri Aug 13 19:01:05 CEST 2010


On Aug 12, 2010, at 6:21 PM, J Andrés Christen wrote:

>
>
> When plotting, no text appears in the Quartz window (no axis labels,  
> etc.) and
> text() does not work:
>
>> plot(1:3,1:3, main="Hi!")
>
> No main title appears a no axis labels.
>
>> text( 2, 2, "w")
>
> no "w" appears.
>
> Earlier today I did a general software update.  I tried changing to  
> the previous version
> I was using, 2.8, but this did not help.
>
> With
>
>> demo(graphics)
>
> all plots appear, but no text at all.  I tested the png() device,  
> and no text appears there either.
>
>

There have been instances where fonts in the Mac system have become  
replaced by corrupted versions. I had it happen with my Symbol font.   
I wonder if one of your primary fonts used by R (and here I believe  
you would be primarily looking at Courier and Helvetica)  suffered a  
similar fate. When it happened to me I found two entries for the same  
font using Font Book.app. Deleting the one that displayed as blanks  
solved the problem. This is what can be used to determine the current  
fonts used by the quartz device:

 > quartzFonts()
$serif
[1] "Times-Roman"      "Times-Bold"       "Times-Italic"     "Times- 
BoldItalic"

$sans
[1] "Helvetica"             "Helvetica-Bold"        "Helvetica- 
Oblique"     "Helvetica-BoldOblique"

$mono
[1] "Courier"             "Courier-Bold"        "Courier-Oblique"      
"Courier-BoldOblique"


--

David Winsemius, MD
West Hartford, CT



More information about the R-SIG-Mac mailing list