Skip to content

Instantly share code, notes, and snippets.

@Swarchal
Created November 25, 2015 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Swarchal/bc600483525f4ba3a833 to your computer and use it in GitHub Desktop.
Save Swarchal/bc600483525f4ba3a833 to your computer and use it in GitHub Desktop.
ggplot(data = df_molten,
aes(x = variable, y = MouseID, fill = value)) +
geom_raster() +
xlab("Protein") +
scale_fill_distiller(palette = "RdYlBu", trans = "log10") + # better colourmap
theme(axis.text.x = element_text(angle = 90, hjust = 1),
axis.text.y = element_blank()) +
ggtitle("ggplot heatmap") +
facet_wrap(~class, scales = "free", ncol = 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment