[R] Using special characters

From: Alexandra R. M. de Almeida <alexandrarma_at_yahoo.com.br>
Date: Fri 27 Jan 2006 - 02:44:57 EST


 Dear R users  

 I'm having problems in putting special characters (like , , ) in my plots, as much in titles, as in axis names, as in legend...when I save them as a pdf document. They don't appear...  I don't know if it is because I'm using a linux platform...  The script is the following:        

library(grDevices) jpeg(file="Fronteira/FronteiraNova.jpeg", bg="white", quality=100,width = 600, height = 480) grafico.fe<-function(varFA,retFA,varC,retC,covRF,retRF,varD,retD) { minx<-min(100*sqrt(varFA),100*varC,100*sqrt(covRF[1,1]),100*sqrt(covRF[2,2]),100*sqrt(covRF[3,3]),100*sqrt(covRF[4,4]),100*varD) maxx<-max(100*sqrt(varFA),100*varC,100*sqrt(covRF[1,1]),100*sqrt(covRF[2,2]),100*sqrt(covRF[3,3]),100*sqrt(covRF[4,4]),100*varD) miny<-min(100*retFA,retC,retRF,retD) maxy<-max(100*retFA,retC,retRF,retD) plot(100*sqrt(varFA),100*retFA,type="l",lwd=2,col=2,xlab="Risco %", ylab="Retorno % (anualizado)", xlim=c(minx-0.01,maxx), ylim=c(miny,maxy),main="Fronteira Eficiente") points(100*varC,retC,pch=16,cex=0.6, col=3) points(100*sqrt(covRF[1,1]),retRF[1],pch=16,cex=0.6,col=4) points(100*sqrt(covRF[2,2]),retRF[2],pch=16,cex=0.6,col=5) points(100*sqrt(covRF[3,3]),retRF[3],pch=16,cex=0.6,col=6) points(100*sqrt(covRF[4,4]),retRF[4],pch=16,cex=0.6,col=7!  )
 points(100*varD,retD,pch=16,cex=0.6,col=1) legend(c(0.91,1.11),c(17.97,18.156),c("Fronteira Eficiente"),lwd=2,cex=0.6, col=2) legend(0.93,18.13,c("Consolidado","Brad","AB","It","Uni","Ot"),pch=16, bty="n", cex=0.6, col=c(3,4,5,6,7,1), ncol=1) } grafico.fe(varFA,retFA,varC,retC,covRF,retRF,varD,retD) dev.off()

 Do someome have a problem like this?  

 Thanks  

 Alexandra Almeida  

  Alexandra R. Mendes de Almeida                                                                   


        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jan 27 02:57:53 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:12 EST