From kasperdanielhansen at gmail.com  Mon Feb 20 15:22:53 2012
From: kasperdanielhansen at gmail.com (Kasper Daniel Hansen)
Date: Mon, 20 Feb 2012 09:22:53 -0500
Subject: [Rd] text(1:10, col=NA) is not transparent
In-Reply-To: <4F422A03.8020402@itwm.fraunhofer.de>
References: <4F422A03.8020402@itwm.fraunhofer.de>
Message-ID: <CAC2h7usFquWNOfNMAc-Xd_fTxWP2JuQAWvHKVwhdtKz70bHpPQ@mail.gmail.com>

Peter,

not all devices support transparency.  My guess is that you are
plotting to a device which does not, but it is hard to know from your
email.

Kasper



On Mon, Feb 20, 2012 at 6:09 AM, Peter Ruckdeschel
<peter.ruckdeschel at itwm.fraunhofer.de> wrote:
> Maybe I am missing something, but according to the help page
> to par (section "Color Specification"), which is referred to in the
> help to text argument col:
>
> ?"transparent"? or (integer) ?NA? is _transparent_,
> useful for filled areas (such as the background!), and just
> invisible for things like lines or text.
>
> but:
>
> col0 <- as.integer(NA)
> is.integer(col0)
> ### is this coercing to "integer" necessary?
> plot(1:10)
> text(1:10, col=col0)
> ### text is plotted
>
> ##whereas
> plot(1:10)
> text(1:10, col="transparent")
> ### text is not plotted
>
> # Of course, this is not terribly urgent, as a color value of 0 also
> plot(1:10)
> text(1:10, col=0)
> ### text is not plotted
>
> Best, Peter
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] text(1:10, col=NA) is not transparent
Kasper Daniel Hansen