[Tikzdevice-bugs] Respecting ggplot2 element_text font family
Alastair Andrew
alastair.andrew at gmail.com
Thu Aug 22 13:54:29 CEST 2013
Hi,
Is there anyway to get RTikzDevice to use the same font face as you've
specified in family argument of element_text?
For example:
library(ggplot2)
p <- ggplot(diamonds, aes(carat, ..density..)) + geom_histogram(binwidth =
1)
p + facet_grid(. ~ cut) + theme(strip.text.x = element_text(family="mono"))
This example will have the facet labels typeset in a monospaced font. If I
use the tikzDevice the output will just have normal serif font face. Is
there anyway to achieve the look I want without manually wrapping the facet
labels in a LaTeX \texttt{}. I tend to find that approach leads to unusual
spacing issues. Especially in the legend.
Thanks,
Alastair.
More information about the Tikzdevice-bugs
mailing list