[R] lattice package - wireframe plot : adding more than one surface and addiding a curve overlaid on the plot

Deepayan Sarkar deepayan.sarkar at gmail.com
Tue Sep 14 13:58:41 CEST 2010


On Sat, Sep 11, 2010 at 2:28 AM, Raffaello Vardavas
<r_vardavas at hotmail.com> wrote:
>
> Dear R help,
>
> Suppose I have a dataframe with three columns named  p, v and C.
>
> Here C is a function of both p and v.  I can plot the surface C(p,v) using the package lattice using the function wireframe.
>
> Now if I have another dataframe - with 2 columns named p_ind and v_ind and pind is a function of v_ind.
>
> I would  like to overlay the plot of the curve p_ind, v_ind and C(p_ind, v_ind) onto my previous plot.
>
> I haven't found a way to do this.

This is going to be fairly difficult with lattice. I would suggest
trying the rgl package instead.

-Deepayan



More information about the R-help mailing list