admin管理员组

文章数量:1122832

I am trying to connect points of each Genotype per Treatment with a line but I have grouped the points by multiple conditions. Below my code so far:

ggplot(ResponseData, 
         aes(x = Time , y = ETR , group = Genotype, color = Treatment, shape=Genotype)) +
    geom_point(size=c(2)) + 
    geom_line(aes(group = Treatment)) +  
    scale_shape_manual(values = c(19,24)) +
    coord_cartesian(xlim=c(0,61), ylim = c(0,200)) +
    theme_bw() +
    theme(legend.position="right")

I can achieve lines connected by treatment, but I would like to connect them by treatment AND Genotype. Below shows the figure I can create but the lines connect the wrong points. I would like the line connecting e.g. all triangles of the red color treatment (like I added manually in the figure) over time for each set of points. How can I achieve this?

I have already tried using: geom_pathand geom_line(group = interaction("Genotype", "Treatment")) but this did not produce any lines for me. Is there anyone of you who could help me out? I'd appreciate it a lot!

Here my data as requested:

dput(head(ResponseData,30))
structure(list(Treatment = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L), levels = c("Control", "Drought", 
"Heat", "HeatDrought"), class = "factor"), Time = c(5.58333333333333, 
10.5833333333333, 15.5833333333333, 20.5833333333333, 25.5833333333334, 
30.5833333333334, 35.5833333333334, 40.5833333333333, 47.4583333333332, 
52.8333333333332, 57.8333333333331, 61.9166666666664, 5.58333333333333, 
10.5833333333333, 15.5833333333333, 20.5833333333333, 25.5833333333334, 
30.5833333333334, 35.5833333333334, 40.5833333333333, 47.4583333333332, 
52.8333333333332, 57.8333333333331, 61.9166666666664, 5.58333333333333, 
10.5833333333333, 15.5833333333333, 20.5833333333333, 25.5833333333334, 
30.5833333333334), Genotype = structure(c(1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L), levels = c("KU15", "KU2"
), class = "factor"), ETR = c(118.796666666667, 132.66, 136.46, 
140.026666666667, 138.51, 140.056666666667, 27.0666666666667, 
27.9566666666667, 28.3933333333333, 28.72, 29.03, 29.1066666666667, 
118.383333333333, 139.48, 144.196666666667, 146.816666666667, 
149.303333333333, 149.93, 27.64, 28.6, 29.0066666666667, 29.39, 
29.51, 29.76, 56.615, 63.075, 67.6875, 71.0575, 71.6125, 75.1275
)), row.names = c(NA, -30L), class = c("tbl_df", "tbl", "data.frame"
), na.action = structure(c(`1` = 1L, `2` = 2L, `3` = 3L, `4` = 4L, 
`5` = 5L, `7` = 7L, `8` = 8L, `9` = 9L, `10` = 10L, `12` = 12L, 
`13` = 13L, `14` = 14L, `15` = 15L, `17` = 17L, `18` = 18L, `19` = 19L, 
`20` = 20L, `22` = 22L, `23` = 23L, `24` = 24L, `25` = 25L, `27` = 27L, 
`28` = 28L, `29` = 29L, `30` = 30L, `32` = 32L, `33` = 33L, `34` = 34L, 
`35` = 35L, `37` = 37L, `38` = 38L, `39` = 39L, `40` = 40L, `42` = 42L, 
`43` = 43L, `44` = 44L, `45` = 45L, `47` = 47L, `48` = 48L, `49` = 49L, 
`50` = 50L, `52` = 52L, `53` = 53L, `54` = 54L, `55` = 55L, `57` = 57L, 
`58` = 58L, `59` = 59L, `61` = 61L, `62` = 62L, `63` = 63L, `64` = 64L, 
`65` = 65L, `67` = 67L, `68` = 68L, `69` = 69L, `70` = 70L, `72` = 72L, 
`73` = 73L, `74` = 74L, `75` = 75L, `77` = 77L, `78` = 78L, `79` = 79L, 
`80` = 80L, `82` = 82L, `83` = 83L, `84` = 84L, `85` = 85L, `87` = 87L, 
`88` = 88L, `89` = 89L, `90` = 90L, `92` = 92L, `93` = 93L, `94` = 94L, 
`95` = 95L, `97` = 97L, `98` = 98L, `99` = 99L, `100` = 100L, 
`102` = 102L, `103` = 103L, `104` = 104L, `105` = 105L, `107` = 107L, 
`108` = 108L, `109` = 109L, `110` = 110L, `112` = 112L, `113` = 113L, 
`114` = 114L, `115` = 115L, `117` = 117L, `118` = 118L, `119` = 119L, 
`121` = 121L, `122` = 122L, `123` = 123L, `124` = 124L, `125` = 125L, 
`127` = 127L, `128` = 128L, `129` = 129L, `130` = 130L, `132` = 132L, 
`133` = 133L, `134` = 134L, `135` = 135L, `137` = 137L, `138` = 138L, 
`139` = 139L, `140` = 140L, `142` = 142L, `143` = 143L, `144` = 144L, 
`145` = 145L, `147` = 147L, `148` = 148L, `149` = 149L, `150` = 150L, 
`152` = 152L, `153` = 153L, `154` = 154L, `155` = 155L, `157` = 157L, 
`158` = 158L, `159` = 159L, `160` = 160L, `162` = 162L, `163` = 163L, 
`164` = 164L, `165` = 165L, `167` = 167L, `168` = 168L, `169` = 169L, 
`170` = 170L, `172` = 172L, `173` = 173L, `174` = 174L, `175` = 175L, 
`177` = 177L, `178` = 178L, `179` = 179L, `181` = 181L, `182` = 182L, 
`183` = 183L, `184` = 184L, `185` = 185L, `187` = 187L, `188` = 188L, 
`189` = 189L, `190` = 190L, `192` = 192L, `193` = 193L, `194` = 194L, 
`195` = 195L, `197` = 197L, `198` = 198L, `199` = 199L, `200` = 200L, 
`202` = 202L, `203` = 203L, `204` = 204L, `205` = 205L, `207` = 207L, 
`208` = 208L, `209` = 209L, `210` = 210L, `212` = 212L, `213` = 213L, 
`214` = 214L, `215` = 215L, `217` = 217L, `218` = 218L, `219` = 219L, 
`220` = 220L, `222` = 222L, `223` = 223L, `224` = 224L, `225` = 225L, 
`227` = 227L, `228` = 228L, `229` = 229L, `230` = 230L, `232` = 232L, 
`233` = 233L, `234` = 234L, `235` = 235L, `237` = 237L, `238` = 238L, 
`239` = 239L, `241` = 241L, `242` = 242L, `243` = 243L, `244` = 244L, 
`245` = 245L, `247` = 247L, `248` = 248L, `249` = 249L, `250` = 250L, 
`252` = 252L, `253` = 253L, `254` = 254L, `255` = 255L, `257` = 257L, 
`258` = 258L, `259` = 259L, `260` = 260L, `262` = 262L, `263` = 263L, 
`264` = 264L, `265` = 265L, `267` = 267L, `268` = 268L, `269` = 269L, 
`270` = 270L, `272` = 272L, `273` = 273L, `274` = 274L, `275` = 275L, 
`277` = 277L, `278` = 278L, `279` = 279L, `280` = 280L, `282` = 282L, 
`283` = 283L, `284` = 284L, `285` = 285L, `287` = 287L, `288` = 288L, 
`289` = 289L, `290` = 290L, `292` = 292L, `293` = 293L, `294` = 294L, 
`295` = 295L, `297` = 297L, `298` = 298L, `299` = 299L, `301` = 301L, 
`302` = 302L, `303` = 303L, `304` = 304L, `305` = 305L, `307` = 307L, 
`308` = 308L, `309` = 309L, `310` = 310L, `312` = 312L, `313` = 313L, 
`314` = 314L, `315` = 315L, `317` = 317L, `318` = 318L, `319` = 319L, 
`320` = 320L, `322` = 322L, `323` = 323L, `324` = 324L, `325` = 325L, 
`327` = 327L, `328` = 328L, `329` = 329L, `330` = 330L, `332` = 332L, 
`333` = 333L, `334` = 334L, `335` = 335L, `337` = 337L, `338` = 338L, 
`339` = 339L, `340` = 340L, `342` = 342L, `343` = 343L, `344` = 344L, 
`345` = 345L, `347` = 347L, `348` = 348L, `349` = 349L, `350` = 350L, 
`352` = 352L, `353` = 353L, `354` = 354L, `355` = 355L, `357` = 357L, 
`358` = 358L, `359` = 359L, `361` = 361L, `362` = 362L, `363` = 363L, 
`364` = 364L, `365` = 365L, `367` = 367L, `368` = 368L, `369` = 369L, 
`370` = 370L, `372` = 372L, `373` = 373L, `374` = 374L, `375` = 375L, 
`377` = 377L, `378` = 378L, `379` = 379L, `380` = 380L, `382` = 382L, 
`383` = 383L, `384` = 384L, `385` = 385L, `387` = 387L, `388` = 388L, 
`389` = 389L, `390` = 390L, `392` = 392L, `393` = 393L, `394` = 394L, 
`395` = 395L, `397` = 397L, `398` = 398L, `399` = 399L, `400` = 400L, 
`402` = 402L, `403` = 403L, `404` = 404L, `405` = 405L, `407` = 407L, 
`408` = 408L, `409` = 409L, `410` = 410L, `412` = 412L, `413` = 413L, 
`414` = 414L, `415` = 415L, `417` = 417L, `418` = 418L, `419` = 419L, 
`421` = 421L, `422` = 422L, `423` = 423L, `424` = 424L, `425` = 425L, 
`427` = 427L, `428` = 428L, `429` = 429L, `430` = 430L, `432` = 432L, 
`433` = 433L, `434` = 434L, `435` = 435L, `437` = 437L, `438` = 438L, 
`439` = 439L, `440` = 440L, `442` = 442L, `443` = 443L, `444` = 444L, 
`445` = 445L, `447` = 447L, `448` = 448L, `449` = 449L, `450` = 450L, 
`452` = 452L, `453` = 453L, `454` = 454L, `455` = 455L, `457` = 457L, 
`458` = 458L, `459` = 459L, `460` = 460L, `462` = 462L, `463` = 463L, 
`464` = 464L, `465` = 465L, `467` = 467L, `468` = 468L, `469` = 469L, 
`470` = 470L, `472` = 472L, `473` = 473L, `474` = 474L, `475` = 475L, 
`477` = 477L, `478` = 478L, `479` = 479L), class = "omit"))

I am trying to connect points of each Genotype per Treatment with a line but I have grouped the points by multiple conditions. Below my code so far:

ggplot(ResponseData, 
         aes(x = Time , y = ETR , group = Genotype, color = Treatment, shape=Genotype)) +
    geom_point(size=c(2)) + 
    geom_line(aes(group = Treatment)) +  
    scale_shape_manual(values = c(19,24)) +
    coord_cartesian(xlim=c(0,61), ylim = c(0,200)) +
    theme_bw() +
    theme(legend.position="right")

I can achieve lines connected by treatment, but I would like to connect them by treatment AND Genotype. Below shows the figure I can create but the lines connect the wrong points. I would like the line connecting e.g. all triangles of the red color treatment (like I added manually in the figure) over time for each set of points. How can I achieve this?

I have already tried using: geom_pathand geom_line(group = interaction("Genotype", "Treatment")) but this did not produce any lines for me. Is there anyone of you who could help me out? I'd appreciate it a lot!

Here my data as requested:

dput(head(ResponseData,30))
structure(list(Treatment = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L), levels = c("Control", "Drought", 
"Heat", "HeatDrought"), class = "factor"), Time = c(5.58333333333333, 
10.5833333333333, 15.5833333333333, 20.5833333333333, 25.5833333333334, 
30.5833333333334, 35.5833333333334, 40.5833333333333, 47.4583333333332, 
52.8333333333332, 57.8333333333331, 61.9166666666664, 5.58333333333333, 
10.5833333333333, 15.5833333333333, 20.5833333333333, 25.5833333333334, 
30.5833333333334, 35.5833333333334, 40.5833333333333, 47.4583333333332, 
52.8333333333332, 57.8333333333331, 61.9166666666664, 5.58333333333333, 
10.5833333333333, 15.5833333333333, 20.5833333333333, 25.5833333333334, 
30.5833333333334), Genotype = structure(c(1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L), levels = c("KU15", "KU2"
), class = "factor"), ETR = c(118.796666666667, 132.66, 136.46, 
140.026666666667, 138.51, 140.056666666667, 27.0666666666667, 
27.9566666666667, 28.3933333333333, 28.72, 29.03, 29.1066666666667, 
118.383333333333, 139.48, 144.196666666667, 146.816666666667, 
149.303333333333, 149.93, 27.64, 28.6, 29.0066666666667, 29.39, 
29.51, 29.76, 56.615, 63.075, 67.6875, 71.0575, 71.6125, 75.1275
)), row.names = c(NA, -30L), class = c("tbl_df", "tbl", "data.frame"
), na.action = structure(c(`1` = 1L, `2` = 2L, `3` = 3L, `4` = 4L, 
`5` = 5L, `7` = 7L, `8` = 8L, `9` = 9L, `10` = 10L, `12` = 12L, 
`13` = 13L, `14` = 14L, `15` = 15L, `17` = 17L, `18` = 18L, `19` = 19L, 
`20` = 20L, `22` = 22L, `23` = 23L, `24` = 24L, `25` = 25L, `27` = 27L, 
`28` = 28L, `29` = 29L, `30` = 30L, `32` = 32L, `33` = 33L, `34` = 34L, 
`35` = 35L, `37` = 37L, `38` = 38L, `39` = 39L, `40` = 40L, `42` = 42L, 
`43` = 43L, `44` = 44L, `45` = 45L, `47` = 47L, `48` = 48L, `49` = 49L, 
`50` = 50L, `52` = 52L, `53` = 53L, `54` = 54L, `55` = 55L, `57` = 57L, 
`58` = 58L, `59` = 59L, `61` = 61L, `62` = 62L, `63` = 63L, `64` = 64L, 
`65` = 65L, `67` = 67L, `68` = 68L, `69` = 69L, `70` = 70L, `72` = 72L, 
`73` = 73L, `74` = 74L, `75` = 75L, `77` = 77L, `78` = 78L, `79` = 79L, 
`80` = 80L, `82` = 82L, `83` = 83L, `84` = 84L, `85` = 85L, `87` = 87L, 
`88` = 88L, `89` = 89L, `90` = 90L, `92` = 92L, `93` = 93L, `94` = 94L, 
`95` = 95L, `97` = 97L, `98` = 98L, `99` = 99L, `100` = 100L, 
`102` = 102L, `103` = 103L, `104` = 104L, `105` = 105L, `107` = 107L, 
`108` = 108L, `109` = 109L, `110` = 110L, `112` = 112L, `113` = 113L, 
`114` = 114L, `115` = 115L, `117` = 117L, `118` = 118L, `119` = 119L, 
`121` = 121L, `122` = 122L, `123` = 123L, `124` = 124L, `125` = 125L, 
`127` = 127L, `128` = 128L, `129` = 129L, `130` = 130L, `132` = 132L, 
`133` = 133L, `134` = 134L, `135` = 135L, `137` = 137L, `138` = 138L, 
`139` = 139L, `140` = 140L, `142` = 142L, `143` = 143L, `144` = 144L, 
`145` = 145L, `147` = 147L, `148` = 148L, `149` = 149L, `150` = 150L, 
`152` = 152L, `153` = 153L, `154` = 154L, `155` = 155L, `157` = 157L, 
`158` = 158L, `159` = 159L, `160` = 160L, `162` = 162L, `163` = 163L, 
`164` = 164L, `165` = 165L, `167` = 167L, `168` = 168L, `169` = 169L, 
`170` = 170L, `172` = 172L, `173` = 173L, `174` = 174L, `175` = 175L, 
`177` = 177L, `178` = 178L, `179` = 179L, `181` = 181L, `182` = 182L, 
`183` = 183L, `184` = 184L, `185` = 185L, `187` = 187L, `188` = 188L, 
`189` = 189L, `190` = 190L, `192` = 192L, `193` = 193L, `194` = 194L, 
`195` = 195L, `197` = 197L, `198` = 198L, `199` = 199L, `200` = 200L, 
`202` = 202L, `203` = 203L, `204` = 204L, `205` = 205L, `207` = 207L, 
`208` = 208L, `209` = 209L, `210` = 210L, `212` = 212L, `213` = 213L, 
`214` = 214L, `215` = 215L, `217` = 217L, `218` = 218L, `219` = 219L, 
`220` = 220L, `222` = 222L, `223` = 223L, `224` = 224L, `225` = 225L, 
`227` = 227L, `228` = 228L, `229` = 229L, `230` = 230L, `232` = 232L, 
`233` = 233L, `234` = 234L, `235` = 235L, `237` = 237L, `238` = 238L, 
`239` = 239L, `241` = 241L, `242` = 242L, `243` = 243L, `244` = 244L, 
`245` = 245L, `247` = 247L, `248` = 248L, `249` = 249L, `250` = 250L, 
`252` = 252L, `253` = 253L, `254` = 254L, `255` = 255L, `257` = 257L, 
`258` = 258L, `259` = 259L, `260` = 260L, `262` = 262L, `263` = 263L, 
`264` = 264L, `265` = 265L, `267` = 267L, `268` = 268L, `269` = 269L, 
`270` = 270L, `272` = 272L, `273` = 273L, `274` = 274L, `275` = 275L, 
`277` = 277L, `278` = 278L, `279` = 279L, `280` = 280L, `282` = 282L, 
`283` = 283L, `284` = 284L, `285` = 285L, `287` = 287L, `288` = 288L, 
`289` = 289L, `290` = 290L, `292` = 292L, `293` = 293L, `294` = 294L, 
`295` = 295L, `297` = 297L, `298` = 298L, `299` = 299L, `301` = 301L, 
`302` = 302L, `303` = 303L, `304` = 304L, `305` = 305L, `307` = 307L, 
`308` = 308L, `309` = 309L, `310` = 310L, `312` = 312L, `313` = 313L, 
`314` = 314L, `315` = 315L, `317` = 317L, `318` = 318L, `319` = 319L, 
`320` = 320L, `322` = 322L, `323` = 323L, `324` = 324L, `325` = 325L, 
`327` = 327L, `328` = 328L, `329` = 329L, `330` = 330L, `332` = 332L, 
`333` = 333L, `334` = 334L, `335` = 335L, `337` = 337L, `338` = 338L, 
`339` = 339L, `340` = 340L, `342` = 342L, `343` = 343L, `344` = 344L, 
`345` = 345L, `347` = 347L, `348` = 348L, `349` = 349L, `350` = 350L, 
`352` = 352L, `353` = 353L, `354` = 354L, `355` = 355L, `357` = 357L, 
`358` = 358L, `359` = 359L, `361` = 361L, `362` = 362L, `363` = 363L, 
`364` = 364L, `365` = 365L, `367` = 367L, `368` = 368L, `369` = 369L, 
`370` = 370L, `372` = 372L, `373` = 373L, `374` = 374L, `375` = 375L, 
`377` = 377L, `378` = 378L, `379` = 379L, `380` = 380L, `382` = 382L, 
`383` = 383L, `384` = 384L, `385` = 385L, `387` = 387L, `388` = 388L, 
`389` = 389L, `390` = 390L, `392` = 392L, `393` = 393L, `394` = 394L, 
`395` = 395L, `397` = 397L, `398` = 398L, `399` = 399L, `400` = 400L, 
`402` = 402L, `403` = 403L, `404` = 404L, `405` = 405L, `407` = 407L, 
`408` = 408L, `409` = 409L, `410` = 410L, `412` = 412L, `413` = 413L, 
`414` = 414L, `415` = 415L, `417` = 417L, `418` = 418L, `419` = 419L, 
`421` = 421L, `422` = 422L, `423` = 423L, `424` = 424L, `425` = 425L, 
`427` = 427L, `428` = 428L, `429` = 429L, `430` = 430L, `432` = 432L, 
`433` = 433L, `434` = 434L, `435` = 435L, `437` = 437L, `438` = 438L, 
`439` = 439L, `440` = 440L, `442` = 442L, `443` = 443L, `444` = 444L, 
`445` = 445L, `447` = 447L, `448` = 448L, `449` = 449L, `450` = 450L, 
`452` = 452L, `453` = 453L, `454` = 454L, `455` = 455L, `457` = 457L, 
`458` = 458L, `459` = 459L, `460` = 460L, `462` = 462L, `463` = 463L, 
`464` = 464L, `465` = 465L, `467` = 467L, `468` = 468L, `469` = 469L, 
`470` = 470L, `472` = 472L, `473` = 473L, `474` = 474L, `475` = 475L, 
`477` = 477L, `478` = 478L, `479` = 479L), class = "omit"))

Share Improve this question edited Nov 24, 2024 at 14:20 Theresa asked Nov 22, 2024 at 23:24 TheresaTheresa 371 silver badge6 bronze badges 1
  • 1 Please post some data. You can use the output of dput(ResponseData) or, to get fewer rows of data dput(head(ResponseData,30)), which will give the first 30 rows. – FJCC Commented Nov 22, 2024 at 23:36
Add a comment  | 

1 Answer 1

Reset to default 1

You need to call interaction() inside aes(), and also remove the quotes around the column names:

library(ggplot2)

ggplot(ResponseData, 
       aes(Time, Y, color = Treatment, shape = Genotype)) +
  geom_point(size = 2) + 
  geom_line(aes(group = interaction(Genotype, Treatment))) +
  scale_shape_manual(values = c(19,24)) +
  labs(x = "Time (min)", y = "ETR") +
  coord_cartesian(xlim = c(0,61), ylim = c(0,200)) +
  theme_bw()

In response to your comment, one way to achieve a 'break' in your lines is to add a new dummy variable to your df identifying Time <= 30.583333 and > 30.583333. You can then add this new variable to you existing interaction().

However, unless there is a sound methodological reason to do so, this risks visually misrepresenting your data. That's because adding a break in the lines implies each grouping is distinct. So while adding a break might result in a less cluttered plot, it's likely to be more graphically 'truthful' to maintain continuous lines. Something to think about anyway.

library(dplyr)
library(ggplot2)

# Sample data
ResponseData <- data.frame(
  Treatment = rep(c("Drought", "Heatdrought", "Control", "Heat"), each = 2),
  Time = rep(c(5.583333, 10.583333, 15.583333, 20.583333,
               25.583333, 30.583333, 35.583333, 40.583333,
               47.458333, 52.833333, 57.833333, 61.916667), each = 8),
  Genotype = rep(c("KU15", "KU2"), 48),
  Y = c(52, 54, 80, 110, 120, 121, 145, 148,
        55, 70, 99, 123, 130, 140, 166, 175,
        60, 77, 100, 124, 133, 147, 173, 178,
        68, 78, 100, 125, 140, 149, 174, 178,
        68, 79, 100, 125, 138, 150, 174, 178,
        75, 82, 101, 125, 139, 151, 173, 176,
        rep(seq(23, 26.5, .5), 6))
  ) |>
  arrange(Treatment, Genotype)
  
# Add dummy variable
ResponseData <- ResponseData |>
  mutate(grp_id = ifelse(Time <= 30.583333, 1, 2))

ggplot(ResponseData, 
       aes(Time, Y, color = Treatment, shape = Genotype)) +
  geom_point(size = 2) + 
  geom_line(aes(group = interaction(Genotype, Treatment, grp_id))) +  
  scale_shape_manual(values = c(19, 24)) +
  labs(x = "Time (min)", y = "ETR") +
  coord_cartesian(xlim = c(0, 61), ylim = c(0, 200)) +
  theme_bw()

本文标签: ggplot2Use R ggplot to with geom point and line grouped by MULITPLE conditionsStack Overflow