[R-SIG-Mac] "legend" command does nothing

Simon Urbanek simon.urbanek at r-project.org
Sun Sep 19 03:26:02 CEST 2010


On Sep 18, 2010, at 9:16 PM, Adrian wrote:

> I remember missing fonts were raised as a possible culprit when I was having
> trouble with text appearing on plots.  I checked my Font Book at that time
> and performed a "resolve duplicates" on all of my fonts.  Then, as now, I
> haven't been able to find any duplicate fonts.
> 

But do you have a working Arial and Helvetica when you look in your font book? Sometime the fonts can be broken ...

Cheers,
Simon


> 
> 
> 2010/9/18 Simon Urbanek <simon.urbanek at r-project.org>
> 
>> Adrian,
>> 
>> missing fonts have cropped up a few times - so far the most common cause
>> were broken fonts - please check your Font Book for duplicate or broken
>> fonts (most specifically Arial). Please let me know if that was the cause.
>> 
>> Thanks,
>> Simon
>> 
>> 
>> On Sep 18, 2010, at 7:35 AM, Adrian wrote:
>> 
>>> Hello,
>>> 
>>> I am having problems adding legends to my plots.  For example, the
>> command
>>> at the bottom of this message produces no legend for me.  The plot
>> appears
>>> correctly, but the legend is completely absent.  Am I doing something
>>> incorrectly in the syntax of the legend function?
>>> 
>>> It is possible that this is related to a problem that I posted previously
>> on
>>> this list: I do not see any text on any graphs unless I explicitly supply
>>> the "family="sans"" argument to any plotting function.
>>> 
>>> Any advice is appreciated.  Thank you,
>>> Adrian Down
>>> 
>>> quartz()
>>> 
>>> Y=cbind(loglamt,yp)
>>> 
>>> matplot(x,Y,
>>> 
>>> xlab="N(t)",ylab="log{N(t+1)/N(t)}",main=ttext,
>>> 
>>> type=c("p","l","l","l","l"),pch=21,col=c("black","blue","green","red",
>>> "purple"),lty=1,lwd=2,family="sans")
>>> 
>>> legend("topright",c("Data","DI model","Ricker","Theta
>> Logistic","Allee"),pch
>>> =c(21,-1,-1,-1),
>>> 
>>> 
>> col=c("black","blue","green","red","purple"),lty=c("blank","solid","solid",
>>> "solid","solid"),lwd=2,plot=TRUE)
>>> 
>>>      [[alternative HTML version deleted]]
>>> 
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>> 
>>> 
>> 
>> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> 



More information about the R-SIG-Mac mailing list