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}
_______________________________________________
Tikzdevice-bugs mailing list
Tikzdev...@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tikzdevice-bugs
Hi Guy,
I cannot reproduce this bug in the absence of Knitr. Given a slight
modification of your example:
require(ggplot2)
require(tikzDevice)
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
p <- qplot(x, mass, data=D, geom='bar', stat='identity', facets=.~theta,
xlab="$x$",ylab="$p_X(x)$",
main='Bernoulli Distribution Mass Functions')
tikz('test.tex', standAlone = TRUE)
print(p)
dev.off()
The standalone file `test.tex` compiles fine and contains the expected
output.
-Charlie