Assuming I have understood correctly, hero are two ways to to this.
The first is done using [data.table} and the second is done using [tidyr}
suppressMessages(library(data.table))
suppressMessages(library(tidyverse))
dat1 <- structure(list(xvar = c(85, 87.1052631578947, 89.2105263157895,
91.3157894736842, 93.4210526315789, 95.5263157894737, 97.6315789473684,
99.7368421052632, 101.842105263158, 103.947368421053, 106.052631578947,
108.157894736842, 110.263157894737, 112.368421052632, 114.473684210526,
116.578947368421, 118.684210526316, 120.789473684211, 122.894736842105,
125), yvar = c(0.369418963297467, 0.323099032122166, 0.279840686657854,
0.240021947632935, 0.2038893768478, 0.17154058185961, 0.142922392239015,
0.117845762330073, 0.0960118628491438, 0.0770288524421301, 0.0604760242732572,
0.0457736690859025, 0.0319835374704113, 0.013989515262266, 0.000111871201558973,
1.17176600352632e-06, 4.67598386797433e-05, 3.70050214571936e-05,
9.50270879381795e-05, -6.93185804440226e-05), zvar = c(0.25,
0.289473684210526, 0.328947368421053, 0.368421052631579, 0.407894736842105,
0.447368421052632, 0.486842105263158, 0.526315789473684, 0.565789473684211,
0.605263157894737, 0.644736842105263, 0.684210526315789, 0.723684210526316,
0.763157894736842, 0.802631578947368, 0.842105263157895, 0.881578947368421,
0.921052631578947, 0.960526315789474, 1)), class = "data.frame", row.names = c(NA,
-20L))
DT <- as.data.table(dat1)
# Reshape with data.table -------------------------------------------------
DT1 <- melt(DT, id.vars = "yvar")
ggplot(DT1, aes(yvar, value, colour = variable )) + geom_line()
# Reshape with tidyr ------------------------------------------------------
dat2 <- dat1 |> pivot_longer(cols = !yvar)
ggplot(dat2, aes(yvar, value, colour = name )) + geom_line()