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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:31:42+00:00 2026-06-08T02:31:42+00:00

I have data such as this: yr X lower upper 1 2004 0.2852 0.3927

  • 0

I have data such as this:

    yr      X  lower  upper
1 2004 0.2852 0.3927 0.1888
2 2005 0.3710 0.2385 0.5093
3 2006 0.3297 0.2177 0.4557
4 2007 0.2230 0.1424 0.3138
5 2008 0.3028 0.1952 0.4237
6 2009 0.3906 0.2798 0.5226
7 2010 0.3382 0.2343 0.4467

Here is some reproducible data:

dt <- structure(list(yr = 2004:2010, X = c(0.2852, 0.371, 0.3297, 0.223, 0.3028, 0.3906, 0.3382), lower = c(0.3927, 0.2385, 0.2177, 0.1424, 0.1952, 0.2798, 0.2343), upper = c(0.1888, 0.5093, 0.4557, 0.3138, 0.4237, 0.5226, 0.4467)), .Names = c("yr", "X", "lower", "upper"), class = "data.frame", row.names = c(NA, -7L))

I would like to plot this, and the results will go in a presentation, so I would like to make it look as nice as possible – I’m sorry to use the subjective “nice” but I don’t know how else to say it ! I have tried this:

library(ggplot2)

ggplot(dt, aes(x=yr, y=X, group=1)) +
    geom_line() +
    geom_errorbar(width=.1, aes(ymin=lower, ymax=upper)) +
    geom_point(shape=21, size=3, fill="blue") +
    ylim(0,0.6)

But I don’t like the results – it just seems to plain and boring:
enter image description here

  • 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-08T02:31:44+00:00Added an answer on June 8, 2026 at 2:31 am

    You could use a ribbon instead of the errorbars

    dt <- structure(list(yr = 2004:2010, 
        X = c(0.2852, 0.371, 0.3297, 0.223, 0.3028, 0.3906, 0.3382), 
        lower = c(0.3927, 0.2385, 0.2177, 0.1424, 0.1952, 0.2798, 0.2343), 
        upper = c(0.1888, 0.5093, 0.4557, 0.3138, 0.4237, 0.5226, 0.4467)),
      .Names = c("yr", "X", "lower", "upper"), class = "data.frame", 
        row.names = c(NA, -7L))
    library(ggplot2)
    ggplot(dt, aes(x=yr, y=X, group=1, ymin = lower, ymax = upper)) +
        geom_ribbon(alpha = 0.2) +
        geom_line() +
        geom_point(shape=21, size=3, fill="blue") +
        ylim(0,0.6)
    

    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 database field with data such as this: 76,60,12 If I want
I have a list of viewmodels which contains vehicle data such as this public
If I have JSON data such as: { datapoints:[ [null, 1234567890, point1], [null, 1234567890,
I have lists of data such as a = [1,2,3,4] b = [a,b,c,d,e] c
All- I have an app in which the users inputs data such as the
I have the Following ActionResult in a Controller. it returns a row of data(such
I have a question about the use of data structures such as ArrayLists in
I have a data frame with two columns. First column contains categories such as
If I have a simple table where the data is such that the rows
I have a bunch of overloaded functions that operate on certain data types such

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.