Translating "level" from stat_density2d to a density or count

1,042 views
Skip to first unread message

Stephen Tran

unread,
May 14, 2018, 8:40:37 PM5/14/18
to ggplot2
Dear all,

I'm using the stat_density2d function to create a contour plot to deal with over plotting. My exact command is: contour = stat_density2d(aes(fill=..level..,alpha=..level..),geom='polygon'). I prefer the appearance of the contour over other types of plots but am having difficulty finding any documentation on how to interpret the 'level'. I am aware from this post,  https://stackoverflow.com/questions/32206623/what-does-level-mean-in-ggplotstat-density2d/ , that higher level means more greater density of points. But for publication purposes, I need to explain precisely what 'level' qualitatively means. Would anybody explain what the 'level' quantitatively means? For instance is there a way to translate the 'level' into a metric such as density of points or counts?

                                               

test.pdf

Brandon Hurr

unread,
May 14, 2018, 9:32:53 PM5/14/18
to stephen...@gmail.com, ggplot2

On Mon, May 14, 2018 at 5:40 PM Stephen Tran <stephen...@gmail.com> wrote:
Dear all,

I'm using the stat_density2d function to create a contour plot to deal with over plotting. My exact command is: contour = stat_density2d(aes(fill=..level..,alpha=..level..),geom='polygon'). I prefer the appearance of the contour over other types of plots but am having difficulty finding any documentation on how to interpret the 'level'. I am aware from this post,  https://stackoverflow.com/questions/32206623/what-does-level-mean-in-ggplotstat-density2d/ , that higher level means more greater density of points. But for publication purposes, I need to explain precisely what 'level' qualitatively means. Would anybody explain what the 'level' quantitatively means? For instance is there a way to translate the 'level' into a metric such as density of points or counts?

                                               

--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages