Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

When publishing my R visual doesn't look same as Desktop

Hello, i am trying to publish my PCA's R visual.  Please i am lost

This is what i see in the desktop part 

 

 

 

 

 

And this is what i see online ..... :

 

 

 

 

not the same type of graphs..... 

 

my code looks like this 

library(FactoMineR)
library(factoextra)
res_pca =PCA(dataset[,1:2], scale.unit = TRUE);
fviz_pca_biplot(res_pca, repel = TRUE,pointsize=1,labelsize=3,label="var",
                col.var = "black"
                col.ind = "red"  
)
 
thanks
  • Anonymous's avatar
    Anonymous
    3 years ago

    I found the solution ... just add false to the first line which is also plotting something. In the desktop only the second line is displayed but when publishing i don't know why the first line is considered.

    res_pca =PCA(dataset[,1:2], scale.unit = TRUE, graph=FALSE);
    fviz_pca_biplot(res_pcarepel = TRUE,pointsize=1,labelsize=3,label="var",
                    col.var = "black"
                    col.ind = "red"  
    )

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    I found the solution ... just add false to the first line which is also plotting something. In the desktop only the second line is displayed but when publishing i don't know why the first line is considered.

    res_pca =PCA(dataset[,1:2], scale.unit = TRUE, graph=FALSE);
    fviz_pca_biplot(res_pcarepel = TRUE,pointsize=1,labelsize=3,label="var",
                    col.var = "black"
                    col.ind = "red"  
    )