[Tikzdevice-bugs] potential bug

Guy Lebanon lebanon at cc.gatech.edu
Tue Apr 3 03:52:55 CEST 2012


a potential bug when I use tikzDevice and knitr (Yihui mentioned I should
email it to this address).

Guy

----------

The following code compiles nicely but the "$\\theta$" inside ggplot2's
facets do not propagate properly. I would like to have the greek symbol in
the facets. In other words, I can use "$\\theta$" as arguments to xlab or
ylab, but not for facets.

\documentclass{article}
\begin{document}

<<sasd,dev='tikz'>>=
x=c(0,1)
D=stack(list("$\\theta=0.3$"=dbinom(x,1,0.3),'$\\theta=0.5$'=dbinom(x,1,0.5),'$\\theta=0.9$'=dbinom(x,1,0.9)))
names(D)=c("mass","theta")
D$x=x
qplot(x, mass, data=D, geom='bar', stat='identity', facets=.~theta,
            xlab="$x$",ylab="$p_X(x)$",main='Bernoulli Distribution Mass
Functions')
@

\end{document}


More information about the Tikzdevice-bugs mailing list