I want to plot a barplot from an input file having Chinese characters.
木材 2 2
表 3 4
笔 4 2
垃圾桶 5 6
杯 6 3
I ex
What problems do you have when you try to get this barplot? It works for me, at least what concerns the Chinise characters. Try
mydata = matrix( c( 2:6, c( 2,4,2,6,3 ) ), nrow= 2 )
mylabs = c( "木材", "表", "笔", "垃圾桶", "杯" )
barplot( mydata, beside=T, horiz= "T", names.arg= mylabs, las= 1, col= c( "red", "blue" ) )
Maybe you have problems when you try to save the plot as pdf. In that case, try jpeg:
jpeg( "plotname.jpg" )
barplot( mydata, beside=T, horiz= "T", names.arg= mylabs, las= 1, col= c( "red", "blue" ) )
dev.off()