[R] How to handle Chinese character in R plot?

Manish Gupta mandecent.gupta at gmail.com
Mon Oct 15 03:40:57 CEST 2012


I just noticed chinese characters are not printed by using this. Some other
characters gets printed on axis as shown below for the sugested solution.



  x <- read.csv(textConnection("名称,类,学生 
木材,2,2 
表,3,4 
笔,4,2 
垃圾桶,5,6 
杯,6,3"), header = TRUE) 
rownames(x) <- x[,1] 
x <- x[,-1] 
barplot(t(x), horiz = TRUE, beside = TRUE, legend.text = TRUE, xlab="名称类学生") 

<http://r.789695.n4.nabble.com/file/n4646185/Screenshot-1.png> 




--
View this message in context: http://r.789695.n4.nabble.com/How-to-handle-Chinese-character-in-R-plot-tp4645950p4646185.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list