Skip to content

Instantly share code, notes, and snippets.

@rguliev
Last active March 21, 2019 13:48
Show Gist options
  • Save rguliev/c2f96dcb96e60afd06ac5f911a7ccde4 to your computer and use it in GitHub Desktop.
Save rguliev/c2f96dcb96e60afd06ac5f911a7ccde4 to your computer and use it in GitHub Desktop.
Plot spectra as heatmap with ggplot + hyperSpec
ggplot(as.long.df(spc), mapping = aes(x = .wavelength, y = spc)) +
geom_vline(aes(color=spc, xintercept=.wavelength)) +
facet_grid(group~.) +
scale_color_gradient2(low='white', mid='red', high='darkred',midpoint = 0.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment