Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"colour" vs "color" when calling autoplot on a PCA #224

Closed
lcmurtaugh opened this issue Aug 4, 2022 · 1 comment · Fixed by #225
Closed

"colour" vs "color" when calling autoplot on a PCA #224

lcmurtaugh opened this issue Aug 4, 2022 · 1 comment · Fixed by #225

Comments

@lcmurtaugh
Copy link

When I follow your sample code to plot a PCA object, but call color= instead of colour=, the argument is ignored.

library(ggfortify)
library(cowplot)
pca_res <- prcomp(iris[1:4], scale = TRUE)
british <- autoplot(pca_res, data=iris, colour='Species')
us <- autoplot(pca_res, data=iris, color='Species')
plot_grid(british, us,  labels=c('colour', 'color'))

I think this is the only time I've ever encountered a difference between the American and British spellings.

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] cowplot_1.1.1    ggfortify_0.4.14 ggplot2_3.3.5  

image3

@terrytangyuan
Copy link
Collaborator

We can add a new argument that are aliases to the existing colour argument. Would you like to submit a PR to contribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants