[Tikzdevice-bugs] Background color for tikzDevice

Cameron Bracken cameron.bracken at gmail.com
Sun Feb 21 23:17:41 CET 2010


Yihui-

We certainly intended it to but It does not right now. The bg and fg
arguments are are available but don't do anything.  We will have to
think a little about how to implement these correctly since they are
not very well defined.  For your particular example you can change the
line near the top from

\draw[color=white,opacity=0] (0,0) rectangle (505.89,505.89);

to

\filldraw[black] (0,0) rectangle (505.89,505.89);

Sorry that is a pain.  It should not be too hard to implement and we
can probably get it into the next release.

-Cameron



On Sat, Feb 20, 2010 at 4:21 PM, Yihui Xie <xieyihui at gmail.com> wrote:
> Hi Charlie and Cameron,
>
> Just a short question: does the tikz device support background color?
> For instance:
>
> \documentclass{article}
> \usepackage[nogin]{Sweave}
> \usepackage{tikz}
> \begin{document}
> \SweaveOpts{cache=TRUE}
> <<bg-fig,fig=TRUE,width=5,height=5>>=
> xx = runif(100)
> yy = runif(100)
> par(bg = "black", mar = rep(0, 4), pch = 20)
> plot(xx, yy, col='yellow')
> @
> \end{document}
>
> There is no black background in the PDF output of the above code...
>
> Thanks for the terrific tikzDevice and pgfSweave!
>
> Regards,
> Yihui
> --
> Yihui Xie <xieyihui at gmail.com>
> Phone: 515-294-6609 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 3211 Snedecor Hall, Ames, IA
> _______________________________________________
> Tikzdevice-bugs mailing list
> Tikzdevice-bugs at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tikzdevice-bugs
>


More information about the Tikzdevice-bugs mailing list