Skip to content

Instantly share code, notes, and snippets.

@JoesDataDiner
Created February 23, 2013 14:16
Show Gist options
  • Save JoesDataDiner/5019926 to your computer and use it in GitHub Desktop.
Save JoesDataDiner/5019926 to your computer and use it in GitHub Desktop.
The Financial Crisis on Tape Part I - Graph - Gold
gold_data = rolling.correlmatrix[((rolling.correlmatrix$Var1=="GLD") * (rolling.correlmatrix$Var2 !="GLD")) == 1,]
ggplot(gold_data, aes(y = Var2, x = quarter, fill = Correl))+
geom_tile() +
scale_fill_gradientn(colours = mycolvec_2
,limits = c(-1,1))+
facet_grid(.~year)+theme_bw() +
theme(panel.grid.major.x = element_blank(),
panel.grid.major.y = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text.x=element_text(angle=90))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment