I'd suggest either a color plot as given by image() and related functions or
a 3d mesh-plot which you can get from persp()

E.g.,

x = seq(0,1,by=0.01); y = x
z = outer(x,y+1,"/") # z = x/(y+1) -- I know that's not a density but you
can adapt as necessary

filled.contour(x,y,z)
persp(x,y,z)

There are many more functions like this available, but here's a start.

Good luck!

Michael Weylandt

On Thu, Aug 11, 2011 at 3:11 PM, annie Zhang <annie.zhang2010@gmail.com>wrote:

> Hi All,
>
> I have a 2-dim density defined on 0<x<1, 0<y<1, x<y. I know the exact
> formula of the density. How can I visualize it? What plot functions can I
> use?
>
> Thanks,
> Annie
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

