I was under the impression that if I used the tikz device (that I am trying for the first time today) that graphic text would be consistent with the text in the rest of my Latex document (generated using Knitr / RStudio). However, what I am seeing (or trying to see) (with and without tikz) is very small font in my graphics. Sample code to demonstrate:
\documentclass[12pt,a4paper]{article}
\begin{document}
Here is some text
<<eg, dev='tikz', size='normalsize',fig.width=12, fig.height=5, fig.cap="ggplot theme not adjusted", echo=FALSE, message=FALSE, warning=FALSE>>=
require(ggplot2)
ggplot(cars) + geom_histogram(aes(speed), binwidth=1)
@
<<egWithTheme, dev='tikz', size='normalsize',fig.width=12, fig.height=5, fig.cap="ggplot element text size 30", echo=FALSE>>=
ggplot(cars) + geom_histogram(aes(speed), binwidth=1) + theme(text=element_text(size=30))
@
<<increasing dpi, dev='tikz', size='normalsize',fig.width=12, fig.height=5, dpi=300, fig.cap="dpi set to 300", echo=FALSE>>=
ggplot(cars) + geom_histogram(aes(speed), binwidth=1)
@
\end{document}
Screenshots of the three resulting figures:
What is the recommended approach for achieving consistency between font sizes in graphics and the document?
Thanks.