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

  • Home
  • SEARCH
  • 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 8578961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:30:41+00:00 2026-06-11T20:30:41+00:00

I have a simple bar graph in ggplot2. I am using the grey scale

  • 0

I have a simple bar graph in ggplot2. I am using the “grey” scale for my bars; the default order is darkest to lightest from left to right. Here’s what my code looks like:

  ggplot.3plus<-ggplot(summary.3plus, aes(x=sp1, y=fract.mean, fill=age.cat)) + 
  geom_bar(position=position_dodge())+ coord_cartesian(ylim = c(1, 1.175))+
  geom_errorbar(aes(ymin=fract.mean-se, ymax=fract.mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9))
  ggplot.3plus<-ggplot.3plus+scale_fill_grey()

I would like to change the color order of the greys to lightest to darkest from left to right, while keeping the bars themselves in the same order. The code I’m using to reverse the order of the color ramp doesn’t seem to be working.

  • 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-06-11T20:30:42+00:00Added an answer on June 11, 2026 at 8:30 pm

    It would be easier with a reproducible example, but what about:

    y + scale_fill_grey(start=0.8, end=0.2)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple function Bar that uses a set of values from a
I have a dead simple progress bar using something like the following: import sys
I am trying to create a simple bar graph including two bars showing the
i need to take user input and make a very simple bar graph from
I'm plotting a large polar graph/pie chart of 40+ bars/rings with ggplot2 (using geom_bar
I have some simple query: SELECT foo, bar FROM table i think you now
I have an unordered list that I am using as a simple navigation bar.
I have a simple list: mylist = [foo, bar, baz] and a QtTableWidget with
I have a simple associative array: $ar = array( 1=>'foo', 2=>'bar', 5=>'foobar', 8=>'barfoo' )
I'm developing a simple Android application that would have an action bar on the

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.