Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7023633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:44:08+00:00 2026-05-27T23:44:08+00:00

Seemingly a very simple thing to do but it took me >30min without finding

  • 0

Seemingly a very simple thing to do but it took me >30min without finding answer.

How do I reverse the order of colors? By looking at documentation for scale_brewer, i figured it can be formatter= argument being suspicious. I passed 'rev' and then rev, but they have no effect (no error message, just ignored).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:44:09+00:00Added an answer on May 27, 2026 at 11:44 pm

    I think you probably want to select the colors using brewer.pal directly and then use scale_colour_manual:

    library(ggplot2)
    library(RColorBrewer)
    
    ggplot(mtcars,aes(x = mpg, y = disp)) + 
        geom_point(aes(colour = factor(cyl))) + 
        scale_colour_manual(values = rev(brewer.pal(3, "BuPu")))
    

    Then you can rev the order of the colors there.

    As of version 2.0,0 of ggplot there is now a more direct way to do this, see the answer by @pbaylis below.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, this is a seemingly simple question, but I'm apparently very very dull. I
I am having problems with a seemingly very simple thing- I want to run
I want to do something seemingly very simple, but I can't find anything about
I'm stuck on a RegEx problem that's seemingly very simple and yet I can't
Seemingly simple, but I cannot find anything relevant on the web. What is the
Seemingly a simple enough question, but I cannot work it out. I want to
This should be seemingly obvious and simple, but it isn't for me and seems
I'm stuck with a seemingly very simple app that I'm trying to develop Basically,
I am trying to implement something seemingly very simple, and I have been beating
I'm having trouble with a seemingly very simple problem: I want to get a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.