Coder Social home page Coder Social logo

Comments (6)

kbroman avatar kbroman commented on May 27, 2024 1

You need to use wes_palette(n=3, "GrandBudapest1") or wes_palette(n=3, "GrandBudapest2").

from wesanderson.

juana-mu avatar juana-mu commented on May 27, 2024 1

Hi!
I'm glad you didn't close this, I was having the same issue and fixed it by deleting the "n=". Give it a try!

from wesanderson.

ThomasPepperz avatar ThomasPepperz commented on May 27, 2024
  scale_fill_manual((values=wes_palette(n = 2, "GrandBudapest1")))

Error: Insufficient values in manual scale. 2 needed but only 0 provided.

@kbroman Karl, thank you for the quick reply. If you have time, the adjusted code is incurring the above error as well. By the way, bravo for dedicating the time to import the wonderful color of Wes Anderson's films into R. Very, very cool.

from wesanderson.

kbroman avatar kbroman commented on May 27, 2024

Seems like that extra set of () is messing things up; I'm not sure why. Try

scale_fill_manual(values=wes_palette(n = 2, "GrandBudapest1"))

from wesanderson.

ThomasPepperz avatar ThomasPepperz commented on May 27, 2024

I think I did remove them after I posted the that last error message, but let me try again. If you're not seeing anything wrong with the code itself or my R Version output then it must be something going on with my data or the way I've constructed my ggplot( ) call, which of course is not your fault. This is the point of troubleshooting error messages I suppose. I don't know how often I just tweaked a ridiculous part of the code and then everything worked for no reasonable explanation.

The only thing that is troubling me is the error messages I'm receiving is recognizing I am trying to supply a number for the values argument but won't work no matter what value I input.

Error: Insufficient values in manual scale. 2 needed but only 0 provided.
                                                                            ... blah blah... +
scale_fill_manual(wes_palette(n = 4, "GrandBudapest2"))
Error: Insufficient values in manual scale. 4 needed but only 0 provided.

I tried it on a different ggplot I created and still having trouble. Oh well. I appreciate your assistance and for creating the wesanderson package. Go ahead and close the issue since it seems to be something on my end as opposed to the package's end and when I come across the solution or my work-around I will go ahead and post it for the sake of posterity.

from wesanderson.

ThomasPepperz avatar ThomasPepperz commented on May 27, 2024

from wesanderson.

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.