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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:28:25+00:00 2026-05-27T06:28:25+00:00

I create a graphic with several groups and plotting a geom_boxplot() over a seet

  • 0

I create a graphic with several groups and plotting a geom_boxplot() over a seet of lines.
However, it would be nice to colour the boxes transparently so that the lines can be seen.

Here’s some sample data:

x11()

name <- c("a", "a", "a", "a", "a", "a","a", "a", "a", "b", "b", "b","b", "b", "b","b", "b", "b")
class <- c("c1", "c1", "c1", "c2", "c2", "c2", "c3", "c3", "c3","c1", "c1", "c1", "c2", "c2", "c2", "c3", "c3", "c3")
year <- c("2010", "2009", "2008", "2010", "2009", "2008", "2010", "2009", "2008", "2010", "2009", "2008", "2010", "2009", "2008", "2010", "2009", "2008")
value <- c(100, 33, 80, 90, 80, 100, 100, 90, 80, 90, 80, 100, 100, 90, 80, 99, 80, 100)

df <- data.frame(name, class, year, value)
df

I draw the graphic with:

p1 <- ggplot(df, aes(year, value))
p1 <- p1 + geom_line(aes(group=name, size=name),colour="#ff2300",alpha=0.5) +     facet_wrap(~ class, scales = "free_y") 
p1 <- p1 + geom_boxplot(aes(group=name))
print(p1)

And on my system the line width in the legend is not correctly displayed. Am I doing something wrong? Thanks in advance!

  • 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-27T06:28:26+00:00Added an answer on May 27, 2026 at 6:28 am

    You can add alpha argument to your boxplot. For example:

    geom_boxplot(aes(group=name), alpha = 0.8)

    will give you

    enter image description here

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

Sidebar

Related Questions

Is there a way to create a JButton with your own button graphic and
I'm trying to create a very simple keyframe animation, whereby a graphic Rotates from
Say a development team includes (or makes use of) graphic artists who create all
I'm using Google closure to create a simple interactive graphic in HTML/JS to be
How would you create the front-end for a web-based circular interface that does not
I'd like to create a PHP image generator that takes several query string parameters
I'm using CSS to create a header graphic: #header { height:125px; background:url(/Content/images/header_footer.jpg) -0 0
I'm using Flash CS4 and Flex 3.4.0. I'd like to create a vector-graphic button
I'm writing a graphic design application for Android where the user can add several
I created a graphic in Flash CS4 that contains text. I embedded the appropriate

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.