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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:06:51+00:00 2026-06-10T23:06:51+00:00

I have a table as follows: > testsizes size value replicate lane 361 16

  • 0

I have a table as follows:

> testsizes
    size value replicate lane
361   16  6898         1   L1
362   17 10707         1   L1
363   18  1786         1   L1
364   19  1721         1   L1
365   20  2454         1   L1
421   16  8486         2   L1
422   17 26691         2   L1
423   18  3241         2   L1
424   19  5068         2   L1
425   20  7579         2   L1
481   16  4152         3   L1
482   17  4452         3   L1
483   18   899         3   L1
484   19  1973         3   L1
485   20  2595         3   L1
571   16  8284         1   L2
572   17  9045         1   L2
573   18  5041         1   L2
574   19  7160         1   L2
575   20  9730         1   L2
631   16  5639         2   L2
632   17  9773         2   L2
633   18  2433         2   L2
634   19  3017         2   L2
635   20  3864         2   L2
691   16 10161         3   L2
692   17 18609         3   L2
693   18  3760         3   L2
694   19  3543         3   L2
695   20  4257         3   L2

> dput(testsizes)
structure(list(size = c(16L, 17L, 18L, 19L, 20L, 16L, 17L, 18L, 
19L, 20L, 16L, 17L, 18L, 19L, 20L, 16L, 17L, 18L, 19L, 20L, 16L, 
17L, 18L, 19L, 20L, 16L, 17L, 18L, 19L, 20L), value = c(6898L, 
10707L, 1786L, 1721L, 2454L, 8486L, 26691L, 3241L, 5068L, 7579L, 
4152L, 4452L, 899L, 1973L, 2595L, 8284L, 9045L, 5041L, 7160L, 
9730L, 5639L, 9773L, 2433L, 3017L, 3864L, 10161L, 18609L, 3760L, 
3543L, 4257L), replicate = c("1", "1", "1", "1", "1", "2", "2", 
"2", "2", "2", "3", "3", "3", "3", "3", "1", "1", "1", "1", "1", 
"2", "2", "2", "2", "2", "3", "3", "3", "3", "3"), lane = c("L1", 
"L1", "L1", "L1", "L1", "L1", "L1", "L1", "L1", "L1", "L1", "L1", 
"L1", "L1", "L1", "L2", "L2", "L2", "L2", "L2", "L2", "L2", "L2", 
"L2", "L2", "L2", "L2", "L2", "L2", "L2")), .Names = c("size", 
"value", "replicate", "lane"), row.names = c(361L, 362L, 363L, 
364L, 365L, 421L, 422L, 423L, 424L, 425L, 481L, 482L, 483L, 484L, 
485L, 571L, 572L, 573L, 574L, 575L, 631L, 632L, 633L, 634L, 635L, 
691L, 692L, 693L, 694L, 695L), class = "data.frame")

I want to make a line plot using ggplot that shows the change in value across sizes. At the moment I have this, amongst the other combinations I have tried:

ggplot(testlengths, aes(size, value, group=replicate, colour=replicate)) 
    + geom_line()

enter image description here

It looks like its trying to incorporate both lanes into the same series. But I can’t find a way to set the lanes as another factor to group on. I want the lines to be grouped based on both the replicate and lane categories. The lanes should be coloured but the replicates do not need to be distinguished between each other.

I am aware that I can probably achieve this by concatenating the two groups into one group beforehand. However, before I go down that route, I am wandering if ggplot can group by more than one grouping in a line plot without facets (I need to use facets later for another grouping)? I feel like it should be able to.

  • 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-10T23:06:53+00:00Added an answer on June 10, 2026 at 11:06 pm

    Based off my comment about interacting the two:

    ggplot(testsizes, aes(x = size, y = value,
                          group = interaction(replicate, lane),
                          colour = lane)) +
     geom_line()
    

    Which gives:

    enter image description here

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

Sidebar

Related Questions

Lets say I have a table as follows, +----+-------------+ | id | value |
I have a data table as follows ID Key Value -------------------------- 1 F1 2
I have a table as follows <table> <tr> <td id=start>Starting Point<input type=button value=start the
I have a table as follows > RowID SessionID EventID RequestedURL Date > 1
So if I have a table as follows with column date datetime employee varchar
I use JPA2 for the dao layer. Suppose i have a table as follows
I have table of data that is sorted as follows: Item | Sample |
I have a emp table as follows empnum deptno salary ----- ------ ------ 1
I have a table defined as follows: CREATE TABLE [dbo].[T]( [FileID] [bigint] NOT NULL,
I have a HTML table as follows. I want retrieve row values from this

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.