how to let R support Chinese fonts in charts?
You need to tell us your OS: see the request in the posting guide for 'at a minimum' the result of sessionInfo(). We also need to know what graphics device(s) you are intending to use. For postscript or PDF, see the article by Paul Murrell and myself in R News 2006-2. Note too that 'Chinese' isn't one language (most OSes have two separate ones for 'traditional' and 'simplified') and several encodings are used for each of those languages. Some devices have separate 'Chinese Fonts' for the two languages.
On Wed, 12 Mar 2008, Samuel wrote:
Hi everyone, I plotted a chart this morning, which should have Chinese lables for the points. I made the chart via: coordinates: angel77wq 360.61501 9.278135 cngdsthuang1220 -278.74068 91.556843 c????c 125.47369 -66.589461 fszym2007 -174.86150 346.672588 john_azyb_lee -59.76965 -13.806237 limu0089 -135.18684 -147.573071 new?? -147.53176 -130.237810 ouyangye1215 103.64392 -154.077046 poleland 20.42025 -190.509781 ???? -324.70414 300.982933 ???? 6.99539 -102.055952 ???? 674.25244 106.671916 ???? -282.92130 -38.153908 ?????? -115.72405 -263.611178 ?????? -165.43261 -174.308852 ?????? -224.57776 332.793277 ????? 139.53463 93.483387 ?????? -77.28240 -301.935448 ???? 627.93457 125.001091 ???? -72.13721 176.418576 label: [1] "angel77wq" "cngdsthuang1220" "c????c" "fszym2007" [5] "john_azyb_lee" "limu0089" "new??" "ouyangye1215" [9] "poleland" "????" "????" "????" [13] "????" "??????" "??????" "??????" [17] "?????" "??????" "????" "????" plot(coordinates,type='n') text(coordinates,labels) and then I got the chart looks like the attached one.
No attachment appeared -- see the posting guide for details of what might be accepted.
I know should be the encoding problem,but I don't know where I can change it. any ideas on this will be greatly appreciated. Thanks in advance. -- Samuel Wu http://webclipping.com.cn
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595