search for: geom_contour

Displaying 10 results from an estimated 10 matches for "geom_contour".

2017 Oct 09
1
example of geom_contour() with function argument
...d paste the wrong snippet earlier and made a typo in doing so, but the result is the same with the more appropriate snippet. require(mvtnorm) require(ggplot2) set.seed(1234) xx <- data.frame(rmvt(100, df = c(13, 13))) v <- ggplot(data = xx, aes(x = X1, y = X2, z = dmvt, 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 (100): x, y, z, df I do not understand how to put in a function as an argument to geom_contour() and the examples in the help f...
2017 Oct 09
1
example of geom_contour() with function argument
Hi BFD, ?geom_contour() *does* have helpful examples. Your Google-foo is weak: Searching for geom_contour brought me: http://ggplot2.tidyverse.org/reference/geom_contour.html as the first result. HTH Ulrik On Mon, 9 Oct 2017 at 08:04 Big Floppy Dog <bigfloppydog at gmail.com> wrote: > Can som...
2017 Oct 09
2
example of geom_contour() with function argument
...compute density as a function of the grid of points xx2$d <- dmvt( as.matrix( xx2[,1:2] ) ) # feels weird not specifying measures of centrality or spread ggplot( data = xx , aes( x = X1 , y = X2 ) ) + geom_point() + # might want this line after the geom_contour geom_contour( data = xx2 # may want to consider geom_tile as well , mapping = aes( x = X1 , y = X2 , z = d ) ) #' ![](https://i.imgur.com/8ExFYtI.pn...
2017 Oct 09
1
example of geom_contour() with function argument
...ng 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 Mo...
2017 Oct 09
1
example of geom_contour() with function argument
...nt 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 > That's not what I get: > v <- ggplot(faithfuld, aes(waiting, erup...
2017 Oct 09
1
example of geom_contour() with function argument
Can someone please point me to an example with geom_contour() that uses a function? The help does not have an example of a function, and also I did not find anything from online searches. TIA, BFD ----------------------------------------------------------------------------------------------- How about geom_contour()? Am So., 8. Okt. 2017, 20:52 schrie...
2017 Jun 18
2
R_using non linear regression with constraints
..., lower = c( 1000, 0 ) , upper = c( 3000, 1 ) ) a <- as.vector( coef( myfit )[ "a" ] ) b <- as.vector( coef( myfit )[ "b" ] ) brks <- c( 500, 1e7, 2e7, 3e7, 4e7 ) ggplot( objdtass, aes( x=a, y=b, z = x, fill=x ) ) + geom_tile() + geom_contour( breaks= brks ) + geom_point( x=a, y=b, colour="red" ) + geom_point( x=objdtassmin$a , y=objdtassmin$b , colour="green" ) + scale_fill_continuous( name="SumSq", breaks = brks ) # Green point is brute-force solution # Red poi...
2017 Jun 18
1
R_using non linear regression with constraints
...upper = c( 3000, 1 ) > ) > a <- as.vector( coef( myfit )[ "a" ] ) > b <- as.vector( coef( myfit )[ "b" ] ) > > brks <- c( 500, 1e7, 2e7, 3e7, 4e7 ) > ggplot( objdtass, aes( x=a, y=b, z = x, fill=x ) ) + > geom_tile() + > geom_contour( breaks= brks ) + > geom_point( x=a, y=b, colour="red" ) + > geom_point( x=objdtassmin$a > , y=objdtassmin$b > , colour="green" ) + > scale_fill_continuous( name="SumSq", breaks = brks ) > # Green point is...
2017 Oct 08
1
how to overlay 2d pdf atop scatter plot using ggplot2
Hi, I am no expert on ggplot2 and I do not know the answer to your question. I looked around a bit but could not find an answer right away. But one possibility could be, if a direct approach is not possible, to draw ellipses corresponding to the confidence regions of the multivariate t density and use geom_polygon to draw this successively? I will wait for a couple of days to see if there is a
2017 Jun 18
2
R_using non linear regression with constraints
I ran the following script. I satisfied the constraint by making a*b a single parameter, which isn't always possible. I also ran nlxb() from nlsr package, and this gives singular values of the Jacobian. In the unconstrained case, the svs are pretty awful, and I wouldn't trust the results as a model, though the minimum is probably OK. The constrained result has a much larger sum of squares.