[R] How could plot a chart with some Chinese's words text?

2003-06-30 Thread Ken Lee
Dear all,
  I want to plot a chart title with some Chinese words at unix system, but I do 
not how to do.
first, it is no problem when  I use write.table like:
 
a-
write.table(a,file=z.txt,sep=\t) 

second, I try 

bitmap(file=z.png)
plot(1:10,main=a)
dev.off()

I can't get a chart with the right title = 

Why have this difference?

Thanks a lot

ken

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] How could plot a chart with some Chinese's words text?

2003-06-30 Thread Prof Brian Ripley
On Mon, 30 Jun 2003, Ken Lee wrote:

 Dear all,
   I want to plot a chart title with some Chinese words at unix system, but I do 
 not how to do.
 first, it is no problem when  I use write.table like:
  
 a-中文
 write.table(a,file=z.txt,sep=\t) 

Not, that is not Chinese for me and I suspect almost all your readers.

 second, I try 
 
 bitmap(file=z.png)
 plot(1:10,main=a)
 dev.off()
 
 I can't get a chart with the right title =中文 
 
 Why have this difference?

Encodings.

bitmap(() uses postscript() and that is set up to use ISO-Latin1 on Unix.
You can change it (see its help file) provided your version of gs has the 
fonts you need.  It is almost certainly easier to use the png() device
*if* you can plot the title you want on an x11() device.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help