Hi I want to customize the plot to something like this: -I want to have some straight line inside the plot and want to change the legend to something in the left side rather than the normal legend in right side. Also add some texts beside the variables (categorize). I have tried ggcorrplot, ggcorr, corrplot, ggplot to make this, but still can't find the solution. Anyone can help? Thanks.
Sample plot-How to make it?
ggcorr(data = NULL, cor_matrix = corr, nbreaks = 4, hjust = 1, size = 3,
color = "grey60", layout.exp = 1, legend.size = 8, name= "R", palette = "RdYlGn") +
labs(title = "Corr") +
theme(plot.title = element_text(size = 13)) +
theme(plot.title = element_text(size = 14, color="grey40"))
Result But I still don't know to move label to diagonal. Anyone?
I found an example code on http://www.sthda.com/english/wiki/ggplot2-quick-correlation-matrix-heatmap-r-software-and-data-visualization hope you can be inspired:
themes()
can help you to change the position and direction of legend.finally you got: