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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:46:20+00:00 2026-05-26T05:46:20+00:00

I am using ggplot to plot time course data (fixation proportions over time to

  • 0

I am using ggplot to plot time course data (fixation proportions over time to different objects on the screen) and want to use a ribbon to show the SE, but the ribbon itself has lines at the top and bottom edges, which makes reading the graph a bit harder. I haven’t been able to figure out how to get rid of those edge lines. Here is my plot code:

ggplot(d, aes(Time, y, color = Object, fill = Object)) +
  stat_summary(fun.y = "mean", geom = "line", size = 2) +
  stat_summary(fun.data = "mean_se", geom = "ribbon", alpha = .3)

Any suggestions?

Here is a minimal working example. I’ve compressed my data to:

   Time Object          y      lower     upper
 1 1000      C 0.12453389 0.04510504 0.2039627
 2 1000      T 0.58826856 0.37615078 0.8003864
 3 1000      U 0.09437160 0.03278069 0.1559625
 4 1100      C 0.12140127 0.03943988 0.2033627
 5 1100      T 0.64560823 0.44898727 0.8422292
 6 1100      U 0.06725172 0.01584248 0.1186610

d <- structure(list(Time = c(1000L, 1000L, 1000L, 1100L, 1100L, 1100L), Object = structure(c(1L, 2L, 3L, 1L, 2L, 3L), .Label = c("C", 
"T", "U"), class = "factor"), y = c(0.12453389, 0.58826856, 0.0943716, 
0.12140127, 0.64560823, 0.06725172), lower = c(0.04510504, 0.37615078, 
0.03278069, 0.03943988, 0.44898727, 0.01584248), upper = c(0.2039627, 
0.8003864, 0.1559625, 0.2033627, 0.8422292, 0.118661)), .Names = c("Time", 
"Object", "y", "lower", "upper"), class = "data.frame", row.names = c("1", 
"2", "3", "4", "5", "6"))

and here is the new plot code:

ggplot(d, aes(Time, y, color = Object, fill = Object)) +
  geom_line(size = 2) +
  geom_ribbon(aes(ymin = lower, ymax = upper), alpha = .3)

  • 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-26T05:46:21+00:00Added an answer on May 26, 2026 at 5:46 am

    You can remove the border using the colour argument:

    ggplot(d, aes(Time, y, color = Object, fill = Object)) +
      geom_line(size = 2) +
      geom_ribbon(aes(ymin = lower, ymax = upper), alpha = .3, colour = NA)
    

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

Sidebar

Related Questions

I want to plot data from different data frames with ggplot. However, I'm having
I have a bunch of measurements over time and I want to plot them
I am using ggplot2 to plot simple line charts of time series data. One
I'm using R. I have 25 variables over 15 time points, with 3 or
I have generated the following plot using the R code that follows it: ggplot(lengths,
I plotted a facet plot using ggplot and here is the plot The problem
I want to plot multiple lines on the sample plot using qplot in the
How can I improve the legend of spatial raster map plot using ggplot when
I'm currently using the ggplot package to plot a histogram of normal variates with
Using PyObjC , you can use Python to write Cocoa applications for OS X.

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.