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 8815503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:23:45+00:00 2026-06-14T04:23:45+00:00

It is easy to make a barplot in R (using the barplot() function). The

  • 0

It is easy to make a barplot in R (using the barplot() function). The default is to have vertical bars that start at the bottom and go up (i.e., the base is at side=1). Furthermore, you can make a barplot with the base on the left (side=1) by using the horiz=T argument. I would like to make a barplot with the base of the bars on the right (side=4).

  • How do you do this?
  • How can you make the base at the top (side=3)?

I would prefer to be able to do this with the base graphics, if possible.

  • 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-14T04:23:47+00:00Added an answer on June 14, 2026 at 4:23 am

    One quick option (probably a bit of a kludge) is to just multiply all of your data by -1, then the bars will go down or left from the axis instead of up or right. You might want to supress the x axis and manually put in the values without the negative sign.

    Other options are to write your own function that draws the boxes from the axis you choose using the rect or other command.

    Or use grid graphics and use a rotated viewport (this would require abandoning the base raphics however).

    Edit

    Actually there turns out to be a less kludgy way to use the base barplot function, see this example (and modify for your situation).

    barplot( 1:5, horiz=TRUE, xlim=c(5,0) )
    

    You will need to replace the 5 in the xlim argument with something based on your data, either the maximum value, the maximum of the sums, the previous times 1.04, etc.

    This will still label the bars on the left (if you give it labels), but you can supress that axis and manually put the axis on the right if that is what you prefer.

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

Sidebar

Related Questions

I am looking for something that will make it easy to run (correctly coded)
I have a JList with a key listener to make it easy for the
Is there anything that CSS Frameworks give that its not easy to make yourself?
I want to make easy registration using one of the users account (Facebook or
It's easy to make objects available to Rhino from Java using ScriptableObject.putProperty , but
It is very easy to make eclipse compare the current local state of the
I saw some handwarmer apps and I guess it's very easy to make something
In mac osx (cocoa), It is very easy to make a blank image of
So im trying to make an easy script, which will hold a video... And
It would be easy enough to make my own system for this, but I'm

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.