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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:27:26+00:00 2026-05-24T16:27:26+00:00

I have a plot with pairs of points that are slightly offset. Each pair

  • 0

I have a plot with pairs of points that are slightly offset. Each pair of points has associated error bars. I have specified that the symbol of the first point in the pair is different from that of the second (closed circle vs open circle). I would like it so that the error bars do not show through the open symbol.

Here is a mock data set:

x = runif(4,-2,2)
x_1 = runif(4,-1,3)
dfr <- data.frame(
 x = c(x, x_1),
 y = rep(c("A","B","C","D"), 2),
 upper = c(x+2, x_1+1),
 lower = c(x-2, x_1-2),
 type = rep(c("alpha", "beta"), each = 4))

And here is the plot:

dodge=position_dodge(width=0.5)  
ggplot(dfr,aes(x=y,y=x,colour=type)) + 
    geom_point(size=8,aes(shape=type),position=dodge) +
    geom_errorbar(aes(ymax=upper,ymin=lower),position = dodge) + 
    scale_colour_manual(values = c('gray','black')) +
    scale_shape_manual(values = c(19,21)) +
    coord_flip() + 
    opts(legend.position="none")

rplot

Thanks for any help you can provide!

  • 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-24T16:27:27+00:00Added an answer on May 24, 2026 at 4:27 pm

    I can’t think of a way to make an ‘open’ point and not let the errorbar show trough. The only way of doing this would be to fill the points with the same colour as the background, but then your gridlines won’t be visible through the point.

    To do this, map the fill aesthetic to type, and specify scale_fill_manual with the fill colour grey90 which is the theme_grey setting:

    ggplot(dfr,aes(x=y,y=x,colour=type, fill=type)) + 
        geom_errorbar(aes(ymax=upper,ymin=lower),position = dodge) + 
        geom_point(size=8,aes(shape=type),position=dodge) +
        scale_colour_manual(values = c('gray','black')) +
        scale_fill_manual(values=c('grey', 'grey90')) +
        scale_shape_manual(values = c(19,21)) +
        coord_flip() + 
        opts(legend.position="none")
    

    enter image description here

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

Sidebar

Related Questions

I have a plot that has $-amounts and dates on y and x axis
I have a plot that has data that runs into the area I'd like
I have multiple sets of xy pairs that I want to plot. I want
I have a plot (sample code pasted below) that I am trying to add
I have a scatter plot in R (with ggplot2). The data has a numeric
I have the following code which lets the user plot two points on a
I have the following data set that I am trying to plot with ggplot2,
Say that I have two figures in matplotlib, with one plot per figure: import
Now I currently have an array that contains 120 pairs. For example: [[1, 12],
I have a set of isoline points (or contour points) such as this: Each

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.