Message-ID: <CAB8pepw-KeGBtu9SFCipEY2fJapUbuUXLmrP2dyRUJZrF2Zp+Q@mail.gmail.com>
Date: 2020-09-21T08:43:02Z
From: Abby Spurdle
Subject: Mapping 2D to 3D
In-Reply-To: <4ab1cbe9-4cf1-4712-a272-12182d2a80b3@meddatainc.com>
Hi H,
I probably owe you an apology.
I was just reading the geom_contour documentation.
It's difficult to follow.
Base R functions, my functions, and pretty much everyone's functions,
take a matrix as input.
But as far as I can tell, geom_contour wants a data.frame with three
{x, y and z} coordinates.
It's not clear how the data in the data.frame is mapped onto the {x,
y, and z} coordinate system.
Also, it uses density estimation in *all* its examples.
Making it difficult for inexperienced users to tell the difference
between contour plots (generally) and density visualization.
I would suggest base R functions as a better starting point:
contour
filled.contour
image
heatmap
persp
I have a package named barsurf, with (almost) density-free examples:
https://cran.r-project.org/web/packages/barsurf/vignettes/barsurf.pdf
Additionally, there are functions in the lattice package, and possibly
the rgl package.