-
Notifications
You must be signed in to change notification settings - Fork 21
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
Can't use custom colors and get a legend from display_xy()
#126
Comments
Hi Michael, Apologies for the delay in responding. I'm actively working the code at the moment, with fixes required by CRAN, and based on new work. It was deliberate to have this distinction, and only put the legend if a variable is used. And expect the palette to specify colours. If colours are specified entirely by setting the col value it's difficult to know what label to apply. Your idea of using the palette= might be workable! |
Oh, that was easy - it should work now, eg animate_xy(flea[,1:6], col=flea$species, palette=c("#F89D38", "#9A78B8", "#73C05B" )) |
Great! I thought that shouldn't be hard. If I try to also set
PS: I like the new |
Oh, you are quick to see the new projection pursuit index! I think it might finally be working this morning. The shapes palette control has been implemented now, try:
|
Thanks for your suggestion Michael, I'm closing this issue as fixed now. |
Thanks for all your help! I'm enjoying playing with tourr |
Using a version of the Penguins data, I want to display grand and other tours, but use custom colors and get a legend. The code in
display_xy()
doesn't allow this because the only way to specifycol=
and get a legend is via thepalette=
arg.I've looked at the code, but can't see how to modify it to meet this need. Perhaps allowing
palette =
to specify a named vector of colors?From
display_xy#68
:Here's my example:
(These colors are actually produced using a function,
peng.colors()
that gives the result as a vector with the species names.)Then, try to use this -- no legend is produced
The code depends on
col
andpch
being factor. If I make them so, I get two separate legends, but species aren't labelled.The text was updated successfully, but these errors were encountered: