I found this very appealing chart about the performance of the S&P500 from the WSJ.:
I'm trying to recreate it in R but I have no idea how to best plot the data, eg
data<-data.frame(stock=c("A","B","C","D"),group=c(rep("Fin",2),rep("Ind",2)),Perf=rnorm(4,0,1),mvalue=abs(rnorm(4,100,50)))
Has anybody a idea how to recreate it (e.g. with ggplot2?) or has anybody ever done a similar plot? Thx in advance.
treemapify
is a ggplot2 solution, as you were hoping for.
https://github.com/wilkox/treemapify
And the results are beautiful & flexible - typical of ggplot2 and its extensions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With