Hi, Â I have found it, it is actually : Â par(family="serif", font=1)Â Â plot(....., family="serif", ......)
family="serif" actually sets the font into TImes new Roman, and actually the availabel family fonts are vary amongst different operating system, I am using Windows XP actually.  the font numerical arguments takes the values of 1=plain text (by defaults), 2= bold, 3= italic, 4= italic bold. This info I got from Hrishi V. Mittal in his R Graphs Cookbook, thnaks for posting it in the list , Cheers, Yakamu  --- On Sat, 1/14/12, David Winsemius <dwinsem...@comcast.net> wrote: From: David Winsemius <dwinsem...@comcast.net> Subject: Re: [R] How can I change font type in graph (including all the text in lagend, and the number in x-y axis) To: "Yakamu Yakamu" <iam_yak...@yahoo.com> Cc: r-help@r-project.org Date: Saturday, January 14, 2012, 12:06 PM On Jan 14, 2012, at 2:19 PM, Yakamu Yakamu wrote: > Dear all, > I would like to make a survival analysis graph line with all fonts in Times > New Roman, > Including all the numbers in x-y axis and the legend explanation. > I know how to change fonts for the x-y axis labels (from > http://www.statmethods.net/advgraphs/parameters.html ) > and this is what i did : > # SURVIVAL PLOT > colsurvival<-c("black", "black", "black", "black") > windowsFonts(A=windowsFont("Times New Roman")) > > plot(fit1, lty=c(2, 1, 4, 3), lwd=2, col=colsurvival, yscale=100, > frame.plot=FALSE) > title(xlab="results", cex.lab=1.3, cex.axis=1.3, ylab="percentage survival", > family="A") > legend(âbottomleftâ, â¦â¦â¦etcâ¦) > I have the titles all in TimesNEw Roman, but not the number in x-y axis. (Since you only passed "A" as an argument to `title`. Why would this be expected to "bleed over" into the axis? I doubt that cex.axis is having any effect, either.) > Is there anyone can help me here? Thank you very much in advance, You may want to see if passing a "family" argument to `plot` has an effect on what is eventually a call to `axis`. That's also (probably) where you should be inserting the "cex.axis". Cannot test since I don't use windows (and you didn't include a reproducible sample, anyway.) (In other situations the "font" argument is often a number rather than the results of a call to a font-function. See the par help page) > Kind regards, > Yakamu > >    [[alternative HTML version deleted]] You should learn to post in plain text and PLEASE stop replying to existing thresads when yu are submitting a new question. It screws up the threading. > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > AND provide commented, minimal, self-contained, reproducible code. David Winsemius, MD West Hartford, CT [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.