Skip to content

Instantly share code, notes, and snippets.

@MJacobs1985
Created November 9, 2022 15:46
Show Gist options
  • Save MJacobs1985/313c0dbd93b8b9bd17130a1a61ad1793 to your computer and use it in GitHub Desktop.
Save MJacobs1985/313c0dbd93b8b9bd17130a1a61ad1793 to your computer and use it in GitHub Desktop.
pan_qol_YN_melt<-reshape2::melt(pan_qol_YN, id=c("Patientnr"));dim(pan_qol_YN_melt);head(pan_qol_YN_melt) # 30*9=270
ggplot(pan_qol_YN_melt, aes(as.factor(variable), as.factor(Patientnr), fill=as.factor(value))) +
geom_tile(colour="white",size=0.25, na.rm=TRUE)+
labs(x="",y="")+scale_y_discrete(expand=c(0,0))+
scale_fill_viridis(discrete = TRUE, option="magma", direction = -1 )+
theme_grey(base_size=10)+marc_discrete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment