From 41d73a8396267fdb4ac7bf9fc1076454276550eb Mon Sep 17 00:00:00 2001 From: Costa <47926492N@ICO.SCS.local> Date: Fri, 4 Feb 2022 15:20:59 +0100 Subject: [PATCH] Cambiar la forma en que ordena los ejes. --- R/ggcorrplot.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/R/ggcorrplot.R b/R/ggcorrplot.R index bb7f6b3..cb52f8f 100644 --- a/R/ggcorrplot.R +++ b/R/ggcorrplot.R @@ -16,9 +16,12 @@ ggcorrplot<-function(df, var, color="#FFFFFF00", stat="signif"){ order<- mcor %>% as.data.frame() %>% add_column(Var1=rownames(mcor),.before=1) %>% clustsort + df$Var1<-factor(df$Var1, levels=order$x) + df$Var2<-factor(df$Var2, levels=order$y) + ggplot(df, aes(Var1, Var2))+ - scale_x_discrete(limits=order$x)+ - scale_y_discrete(limits=order$y)+ + # scale_x_discrete(limits=order$x)+ + # scale_y_discrete(limits=order$y)+ geom_tile(aes(fill=Value), color=color)+ geom_text(data=df.pval, aes(label=Value), color="white")+ scale_fill_gradientn(colors=col2(200))+