Giter Site home page Giter Site logo

Comments (7)

friendly avatar friendly commented on September 2, 2024

Oh, I should add something that does work, if I'm willing to use one of the built-in palettes.

animate(peng_scaled,
        tour_path = guided_tour(holes()),
        display = display_xy(col = peng$species,
                             palette = "Roma",
                             cex = 1.5))

image

from tourr.

dicook avatar dicook commented on September 2, 2024

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!

from tourr.

dicook avatar dicook commented on September 2, 2024

Oh, that was easy - it should work now, eg

animate_xy(flea[,1:6], col=flea$species, palette=c("#F89D38", "#9A78B8", "#73C05B" ))

from tourr.

friendly avatar friendly commented on September 2, 2024

Great! I thought that shouldn't be hard.
But what about pch?

If I try to also set pch, I get the correct point symbols in the plot, but not in the legend

animate(peng_scaled,
        tour_path = grand_tour(d=2),
        display = display_xy(col = peng$species,
                             palette = peng.colors("dark"),
                             pch = 15:17,
                             cex = 1.2))

image

PS: I like the new guided_anomaly_tour !

from tourr.

dicook avatar dicook commented on September 2, 2024

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:

animate_xy(flea[, -7], col = flea$species, pch = flea$species, shapeset=c(1,2,3))

from tourr.

dicook avatar dicook commented on September 2, 2024

Thanks for your suggestion Michael, I'm closing this issue as fixed now.

from tourr.

friendly avatar friendly commented on September 2, 2024

Thanks for all your help! I'm enjoying playing with tourr

from tourr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.