From murdoch.duncan at gmail.com  Tue Oct  8 12:28:06 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Tue, 08 Oct 2013 06:28:06 -0400
Subject: [Rd] graphics:persp - suggestion
In-Reply-To: <CAOKy5g9rAWSfqSPxoa_6hNjOeccxvhp5UZCtkjfoyxxT6Hs4aw@mail.gmail.com>
References: <CAOKy5g9rAWSfqSPxoa_6hNjOeccxvhp5UZCtkjfoyxxT6Hs4aw@mail.gmail.com>
Message-ID: <5253DE36.1050801@gmail.com>

On 13-10-08 1:48 AM, Christoph H?ni wrote:
> Dear Devels,
>
> I'm not sure if I'm going the right way by mailing to this list. I have two
> suggestions regarding the persp function from the graphics package:
>
> 1. In the documentation of the persp function, it is said, that the "col"
> argument will ignore transparent colors. However, this is not true, if you
> use strings as color code - at least it works with HEX-code (eg. :
> col="#bf000022" would produce a red-colored surface with transparency = 22).

That may be an obsolete limitation.  I'll take a look...
>
> 2. It would be helpful if one could add a surface to an existing plot. I
> simply copied persp and deleted the "plot.new()" line, but I guess there
> are better ways...


That won't work in general.  persp() relies in the "painter's 
algorithm", in which objects at the back are drawn before objects in 
front of them.  If you put two surfaces into the same plot there will be 
no way to guarantee that.

If you want two surfaces in the same plot (or other things in a surface 
plot), you should probably use persp3d from the rgl package.

Duncan Murdoch



[Rd] graphics:persp - suggestion
Duncan Murdoch