Skip to content
Prev 371722 / 398500 Next

example of geom_contour() with function argument

Hello Ulrik,

I apologize, but I can not see how to provide a pdf in place of the density
function which calculates a KDE (that is, something from the dataset in the
example). Can you please point to the specific example that might help?

Here is what I get:

require(mvtnorm)
require(ggplot2)
set.seed(1234)
xx <- data.frame(rmvt(100, df = c(13, 13)))


v <- ggplot(faithfuld, aes(waiting, eruptions, z = drmvt, df = c(13,13)))
v + geom_contour()

Don't know how to automatically pick scale for object of type function.
Defaulting to continuous.
Error: Aesthetics must be either length 1 or the same as the data (5625):
x, y, z, df


Can you please tell me how to use this here? Or is some other example more
appropriate?

TIA,
BFD



On Mon, Oct 9, 2017 at 2:22 AM, Ulrik Stervbo <ulrik.stervbo at gmail.com>
wrote: