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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -