Skip to content

Instantly share code, notes, and snippets.

@mdsumner
Created February 19, 2020 20:52
Show Gist options
  • Save mdsumner/da1cec89b3f190e6714a0fec54eee7c8 to your computer and use it in GitHub Desktop.
Save mdsumner/da1cec89b3f190e6714a0fec54eee7c8 to your computer and use it in GitHub Desktop.
tm <- quadmesh::triangmesh(volcano)
xyzg <- tibble::tibble(x = tm$vb[1, tm$it], 
                       y = tm$vb[2, tm$it], 
                       z = tm$vb[3, tm$it], 
                       g = rep(seq_len(ncol(tm$it)), each = nrow(tm$it)))
library(ggplot2)
ggplot(xyzg, aes(x, y, group = g, fill = z)) + 
  geom_polygon()

Created on 2020-02-19 by the reprex package (v0.3.0)

@mdsumner
Copy link
Author

Cool, appreciated!

(Great data!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment