Skip to content

How to handle Chinese character in R plot?

2 messages · Manish Gupta, Brian Ripley

#
Hi, 

I m working on R plot with Russian label but on windows (adobe) russian text
are not visible. Do i need to install some package to view it.

 pdf("sample.pdf",width = 6.6 ,height = 4.2,family= "URWHelvetica", 
encoding="KOI8-R")
 x<-c(1,2,3,4,5)
 y<-c(2,3,4,5,6)
 xlable<-c("?????","?????","????","?????","????????")
 plot(x,y,xlab=xlable)
 dev.off()

Regards



--
View this message in context: http://r.789695.n4.nabble.com/Re-How-to-handle-Chinese-character-in-R-plot-tp4651262.html
Sent from the R help mailing list archive at Nabble.com.
#
Your subject line says Chinese!
On 29/11/2012 08:42, Manish Gupta wrote:
See ?pdf:

      If you see problems with PDF output, do remember that the problem
      is much more likely to be in your viewer than in R.  Try another
      viewer if possible.

The fonts include with the Adobe viewers do not cover Cyrillic (as the 
help in fact says).  It does work in poppler-based and gs-based viewers.

It is possible that you need to install a suitable language pack for 
your unstated Adobe viewer.

There are other devices for pdf, as the help says.  Seem if cairo_pdf() 
works on Windows.