[Tikzdevice-bugs] clash when package transparent

29 views
Skip to first unread message

Matthieu Stigler

unread,
Sep 7, 2011, 8:48:23 AM9/7/11
to tikzdev...@r-forge.wu-wien.ac.at, Boris Veytsman
Hi

I am discovering an interesting issue when using tikz for ggplot2, in a
LaTeX document where package transparent is loaded...

Basically, when the user does not specify explicitely which color should
be used in ggplots bars (the color for outer lines of bars, not for
inner fill), ggplot will not put any. tikz seems to be doing the same.
However, things change when the package transparency is loaded: outer
lines are now visible!

Please compare reproducible example below, adding/removing %
\usepackage{transparent}:

library(ggplot2)
library(tikzDevice)

options( tikzLatexPackages = c(
"\\usepackage{tikz}",
"\\usepackage{transparent}",
"\\usepackage[active,tightpage]{preview}",
"\\PreviewEnvironment{pgfpicture}",
"\\setlength\\PreviewBorder{0pt}")
)

tikz(standAlone=TRUE)
diamonds2<-droplevels(subset(diamonds, color%in%c("E","I")))
qplot(carat, data = diamonds2, geom = "bar", fill =
color)#+myScale_fill3()+scale_colour_manual(value =
rep(c(part1_sec1,part1_sec2),3))
dev.off()


Do you confirm outer lines change with/without pkg transparent or is it
specific to my computer? Were you aware of this? How can one solve it?

Thanks!!

Matthieu


_______________________________________________
Tikzdevice-bugs mailing list
Tikzdev...@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tikzdevice-bugs

Boris Veytsman

unread,
Sep 7, 2011, 1:22:06 PM9/7/11
to matthieu...@gmail.com, tikzdev...@r-forge.wu-wien.ac.at, bor...@lk.net
MS> Date: Wed, 07 Sep 2011 14:48:23 +0200
MS> From: Matthieu Stigler <matthieu...@gmail.com>


MS> Basically, when the user does not specify explicitely which color should
MS> be used in ggplots bars (the color for outer lines of bars, not for
MS> inner fill), ggplot will not put any. tikz seems to be doing the same.
MS> However, things change when the package transparency is loaded: outer
MS> lines are now visible!

Well, tikz uses its own transparency code (see examples in
http://www.texample.net/tikz/examples/feature/transparency/), and it
seems to conflict with the one in transparent package.

The documentation of transparent package says `Because of the poor
interface for page resources, there can be problems with
packages that also use \pdfpageresources.'. Pgf is one of such
packages: systemlayer/pgfsys-pdftex.def says:
\expandafter\global\expandafter\pdfpageresources\expandafter{\temp}

I'd suggest using tikz transparency code for tikz pictures...

--
Good luck

-Boris

You never learn anything by doing it right.

Charlie Sharpsteen

unread,
Sep 7, 2011, 7:30:10 PM9/7/11
to tikzd...@googlegroups.com, matthieu...@gmail.com, tikzdev...@r-forge.wu-wien.ac.at, bor...@lk.net
On Wednesday, September 7, 2011 10:22:06 AM UTC-7, Boris Veytsman wrote:
>
> MS> Date: Wed, 07 Sep 2011 14:48:23 +0200
> MS> From: Matthieu Stigler <matthieu...@gmail.com>
>
>
> MS> Basically, when the user does not specify explicitely which color
> should
> MS> be used in ggplots bars (the color for outer lines of bars, not for
> MS> inner fill), ggplot will not put any. tikz seems to be doing the same.
> MS> However, things change when the package transparency is loaded: outer
> MS> lines are now visible!
>
> Well, tikz uses its own transparency code (see examples in
> http://www.texample.net/tikz/examples/feature/transparency/), and it
> seems to conflict with the one in transparent package.
>
> The documentation of transparent package says `Because of the poor
> interface for page resources, there can be problems with
> packages that also use \pdfpageresources.'. Pgf is one of such
> packages: systemlayer/pgfsys-pdftex.def says:
> \expandafter\global\expandafter\pdfpageresources\expandafter{\temp}
>
> I'd suggest using tikz transparency code for tikz pictures...
>
> --
> Good luck
>
> -Boris
>
I second that, TikZ has it's own built-in color handling code and trying to
go around it can be very troublesome. After looking over the documentation
of the transparent package, I don't see any functionality that is not
provided by TikZs color system.

-Charlie

Matthieu Stigler

unread,
Sep 8, 2011, 3:34:05 AM9/8/11
to tikzd...@googlegroups.com, tikzdev...@r-forge.wu-wien.ac.at, Charlie Sharpsteen, bor...@lk.net
Le 08/09/2011 01:30, Charlie Sharpsteen a écrit :
> On Wednesday, September 7, 2011 10:22:06 AM UTC-7, Boris Veytsman wrote:
>
> MS> Date: Wed, 07 Sep 2011 14:48:23 +0200
> MS> From: Matthieu Stigler <matthieu...@gmail.com>
>
>
> MS> Basically, when the user does not specify explicitely which
> color should
> MS> be used in ggplots bars (the color for outer lines of bars,
> not for
> MS> inner fill), ggplot will not put any. tikz seems to be doing
> the same.
> MS> However, things change when the package transparency is
> loaded: outer
> MS> lines are now visible!
>
> Well, tikz uses its own transparency code (see examples in
> http://www.texample.net/tikz/examples/feature/transparency/
> <http://www.texample.net/tikz/examples/feature/transparency/>), and it

> seems to conflict with the one in transparent package.
>
> The documentation of transparent package says `Because of the poor
> interface for page resources, there can be problems with
> packages that also use \pdfpageresources.'. Pgf is one of such
> packages: systemlayer/pgfsys-pdftex.def says:
> \expandafter\global\expandafter\pdfpageresources\expandafter{\temp}
>
> I'd suggest using tikz transparency code for tikz pictures...
>
> --
> Good luck
>
> -Boris
>
> I second that, TikZ has it's own built-in color handling code and
> trying to go around it can be very troublesome. After looking over the
> documentation of the transparent package, I don't see any
> functionality that is not provided by TikZs color system.
>
> -Charlie
Thanks for your answers!

Well the issue is when on e is using a R -> tikz picture in a latex
class that is using transparent by default! The package transparent is
loaded for other purpose than the tikz code, but yet interacts with
it.... I guess there is no way to prevent this other than removing the
transparent package?

Thanks!!

Mat

Reply all
Reply to author
Forward
0 new messages