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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:48:12+00:00 2026-06-12T03:48:12+00:00

Does anyone know how to create a scatterplot in R to create plots like

  • 0

Does anyone know how to create a scatterplot in R to create plots like these in PRISM’s graphpad:

enter image description here

I tried using boxplots but they don’t display the data the way I want it. These column scatterplots that graphpad can generate show the data better for me.

Any suggestions would be appreciated.

  • 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-12T03:48:14+00:00Added an answer on June 12, 2026 at 3:48 am

    As @smillig mentioned, you can achieve this using ggplot2. The code below reproduces the plot that you are after pretty well – warning it is quite tricky. First load the ggplot2 package and generate some data:

    library(ggplot2)
    dd = data.frame(values=runif(21), type = c("Control", "Treated", "Treated + A"))
    

    Next change the default theme:

    theme_set(theme_bw())
    

    Now we build the plot.

    1. Construct a base object – nothing is plotted:

      g = ggplot(dd, aes(type, values))
      
    2. Add on the points: adjust the default jitter and change glyph according to type:

      g = g + geom_jitter(aes(pch=type), position=position_jitter(width=0.1))
      
    3. Add on the “box”: calculate where the box ends. In this case, I’ve chosen the average value. If you don’t want the box, just omit this step.

      g = g + stat_summary(fun.y = function(i) mean(i), 
              geom="bar", fill="white", colour="black")
      
    4. Add on some error bars: calculate the upper/lower bounds and adjust the bar width:

      g  = g + stat_summary(
              fun.ymax=function(i) mean(i) + qt(0.975, length(i))*sd(i)/length(i), 
              fun.ymin=function(i) mean(i) - qt(0.975, length(i)) *sd(i)/length(i),
              geom="errorbar", width=0.2)
      
    5. Display the plot

      g
      

    enter image description here

    1. In my R code above I used stat_summary to calculate the values needed on the fly. You could also create separate data frames and use geom_errorbar and geom_bar.
    2. To use base R, have a look at my answer to this question.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to create a tumblr like field as they have on
Does anyone know good example of using CSS to create rounded corner box where:
Does anyone know how to create a text crawl like that shown at the
Does anyone know how to create a raw socket to a USB device? Like
Does anyone know how to create a commit using the ruby bindings (the 'rugged'
Does anyone know how to create an installation project using Visual Studio 2010 that
Does anyone know how to create custom buttons for Interface Builder? Like instead of
Does anyone know how to create an entire database from a visual studio database
Does anyone know how to create your own JPA provider? I was considering making
Does anyone know how to create a texture with a YUV colorspace so that

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.