r - Inserting values in a heatmap plotted using ggplot -


i have prepared heatmap using ggplot using following commands:

mat_data=read.xlsx("average_trendfollowing.xlsx") mat_data$investment.horizon=factor(mat_data$investment.horizon, levels=mat_data$investment.horizon)  p <- ggplot(data = mat_data) +                        # set data   geom_tile(aes(y = investment.horizon, x = smoothing.parameter, fill = annualized.returns)) +        # define variables plot   scale_fill_gradient(low = "white", high = "black")  p + ggtitle("trendfollowing strategy") +    theme(plot.title = element_text(lineheight=.8, face="bold")) 

how insert datapoints of annualized.returns plots. used

geom_text(aes(fill = mat_data$annualized.returns))  

which found on net not working somehow.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -