Re: [R] Using the Arial font in the plot function.

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon, 14 Apr 2008 15:25:07 +0100 (BST)

You forgot to tell us your OS, so it was probably Windows.

If it is Windows, Arial is the default font for the windows() family of devices, including png(). However, bitmapped plots don't have text or fonts, just pixels.

As for postscript(), I am unaware of the existence of a PostScript font called 'arial'. Arial as used on Windows and Mac OS is a truetype font, and although there are some ways to incorporate truetype fonts in PostScript, they will need to be done external to R.

But you also forgot to tell why you want such a plot, and I would have expected a Windows metafile (the win.metafile() device, or from a menu) was the right transfer medium on Windows.

On Mon, 14 Apr 2008, Todd Remund wrote:

>
> I would like to ensure that all the text in my plot is in the arial
> font, like in excel and word. I have been saving my graphics to a file
> using the png() function, and have tried the postscript() function. In
> the documentation I have not been able to find a way of changing the
> family argument to an arial font. Does it exist? How would I go about
> creating a png or ps graphic using Arial? Thank you.
>
> Here is the code.
>
> par(family= what?)
> plot(1,1, main='Main Title')
>
> or
>
> postscript('C:/Plot1.ps', family=what?)
>
> plot(1,1, main='Main Title')
>
> dev.off()
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_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.
>

-- 
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

______________________________________________
R-help_at_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.
Received on Mon 14 Apr 2008 - 14:28:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 Apr 2008 - 15:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive