[R] Mapping 2D to 3D
co|or|e @end|ng |rom gm@||@com
Fri Sep 18 09:08:51 CEST 2020
There are some further references in the own "RStudio Community" and in
On Fri, Sep 18, 2020 at 4:17 AM H <agents using meddatainc.com> wrote:
> I am trying to understand how to map 2D to 3D using ggplot() and
> eventually plot_gg(). I am, however, stuck on understanding how to express
> the third variable to be mapped. This example:
> ggdiamonds = ggplot(diamonds, aes(x, depth)) +
> stat_density_2d(aes(fill = stat(nlevel)),
> geom = "polygon", n = 100, bins = 10,contour = TRUE) +
> facet_wrap(clarity~.) +
> scale_fill_viridis_c(option = "A")
> uses a variable nlevel that I now understand is calculated during the
> building of the ggplot but I have not figured out from where it is
> calculated or how to specify a variable of my choosing.
> Does anyone have a good reference for understanding how to specify this
> variable? Most examples on the 'net seem to use the same dataset but do not
> specify this particular aspect...
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help