0
내 .Rnw
비머 프리젠 테이션 내에서 맞춤 글꼴을 사용하고 싶습니다. 오류를 재현 최소한의 작업 예는 다음과 같습니다스웨터와 비머가있는 사용자 정의 ggplot 글꼴
\documentclass{beamer}
\begin{document}
\begin{frame}[plain]
<<echo=FALSE>>=
library(ggplot2)
library(extrafont)
@
\begin{figure}
\centering
<<label = test, fig=TRUE, include=FALSE, echo=FALSE, message=FALSE>>=
ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() +
ggtitle("Fuel Efficiency of 32 Cars") +
xlab("Weight (x1000 lb)") + ylab("Miles per Gallon") +
theme_bw() +
theme(text=element_text(family="Garamond", size=14))
@
\includegraphics[width=\textwidth]{test}
\end{figure}
\end{frame}
\end{document}
및 오류 메시지는 다음과 같습니다
Writing to file test.tex
Processing code chunks with options ...
1 : keep.source term verbatim (test.Rnw:6)
Registering fonts with R
2 : keep.source term verbatim pdf (label = test, test.Rnw:12)
Error in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, :
invalid font type
Calls: <Anonymous> ... drawDetails -> drawDetails.text -> grid.Call.graphics
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Execution halted
을하지만 콘솔에서 ggplot 명령을 사용할 때, 모든 것이 잘 보인다.
도움을 주시면 감사하겠습니다.
유일한 방법 내가 .Rnw 파일을 사용하여 오류를 재현 할 수있는, 내가 설치되지 않은 것 글꼴을 사용하려고하면 다음과 같습니다
여기에 작동하는 코드입니다. 콘솔에서 R은 기본 글꼴로 되돌아 가고 제거 된 글꼴을 사용하려고하면 경고를 표시합니다. –그건 이상합니다. 'fonts()'를 보면 폰트가 설치되어있는 것을 볼 수 있으며'extrafont'에 액세스 할 수 있습니다. – Pascal