[R-SIG-Mac] Help on the quartz font problem
Yanyuan Zhu
yyz at tongji.edu.cn
Fri Jul 12 12:45:57 CEST 2013
Dear All, I got some problems in displaying my font when I plot by R.
Here's the environment I use
x86_64-apple-darwin10.8.0
R version 3.0.1 (2013-05-16) -- "Good Sport"
When I try to plot a figure in either Rstudio or Emacs(with ESS), for
example, the following command
plot(Dep.real.ln~AggGRP.real.ln,
ylab="Depreciation (ln)",
xlab=expression(paste(Sigma, " GRP (ln)"))
)
abline(DepAggGRP.lm)
b0 <- round(DepAggGRP.lm.sum$coefficients[1,1], 2)
b1 <- round(DepAggGRP.lm.sum$coefficients[2,1],2)
r2 <- round(DepAggGRP.lm.sum$r.squared,2)
eqn <- bquote(italic(y)==.(b0)+.(b1)*italic(x)*"," ~~r^2==.(r2))
#italic(y) == .(b0) + .(b1) * italic(x) ","~~R^2 == .(r2))
text(9.5, 7.0, eqn, pos=4)
I got the output pdf like attached. Obviously the font fails to display
greek words in xlab, and some basic operation symbols in text(). I try to
open the pdf in PDF viewer, say, acrobat reader, it works fine, as attached.
After googling a while, I see it might be due to the quartz settings. But I
really dont know how to do that: can I change my settings, to let my quartz
display plot font correctly, just like the acrobat reader does, plz?
thanks in advance.
here are some of my R output that might be needed.
> quartzFont()
Error in checkQuartzFont(family) :
argument "family" is missing, with no default
> quartzFonts()
$serif
[1] "Times-Roman" "Times-Bold" "Times-Italic"
[4] "Times-BoldItalic"
$sans
[1] "Helvetica" "Helvetica-Bold"
[3] "Helvetica-Oblique" "Helvetica-BoldOblique"
$mono
[1] "Courier" "Courier-Bold" "Courier-Oblique"
[4] "Courier-BoldOblique"
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20130712/177495b4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2013-07-12 at 6.35.43 PM.png
Type: image/png
Size: 45506 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20130712/177495b4/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2013-07-12 at 6.36.34 PM.png
Type: image/png
Size: 26038 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20130712/177495b4/attachment-0003.png>
More information about the R-SIG-Mac
mailing list