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

Strange Handling of Colouring By Variable in Current Environment #135

Open
DarioS opened this issue Dec 5, 2016 · 1 comment
Open

Strange Handling of Colouring By Variable in Current Environment #135

DarioS opened this issue Dec 5, 2016 · 1 comment

Comments

@DarioS
Copy link
Contributor

DarioS commented Dec 5, 2016

The legend is missing.

species <- as.numeric(factor(iris[, "Species"]))
autoplot(prcomp(iris[, 1:4]), colour = species, environment = environment())
Warning message:
In if (value %in% columns) { :
  the condition has length > 1 and only the first element will be used

Picking a column from the data frame works without a problem.

autoplot(prcomp(iris[, 1:4]), data = iris, colour = "Species") # Legend shown.
@sinhrks
Copy link
Owner

sinhrks commented Dec 5, 2016

related to #120. Currently , colour must be a single string of column name to specify color. Will consider a fix when I have a time.

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

No branches or pull requests

3 participants