0

我有以下代码:

p1 <- ggplot(df_test, aes(x=AA_Number,y=Energy_Profile,col='red')) + geom_line() + facet_wrap(~Model, ncol=3) + geom_hline(yintercept=-0.03, colour='blue') + geom_line(data=df_templates, colour="green")

print(p1)

它产生这个输出:

阴谋

我无法将绿色数据合并到一个图中,然后将其绘制在其他三个红色图上。

本质上,绿色图是我的常数,我想通过将绿色数据覆盖在每个红色图的顶部来查看我的红色数据如何与常数变化。

有人有什么想法吗?

数据:

df_test

structure(list(Model = 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, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1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L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("102", 
"103", "104", "105", "107", "108", "109", "118", "141", "143", 
"144", "145", "14x", "161", "162", "163", "164", "165", "167", 
"168", "169", "2", "21", "22", "25", "26", "27", "3", "31", "310", 
"32", "36", "37", "39", "51", "510", "52", "53", "54", "57", 
"61", "62", "64", "65", "66", "67", "68", "81", "84", "88", "910", 
"93", "95", "97"), class = "factor"), AA_Number = 1:614, AA = structure(c(1L, 
15L, 1L, 10L, 11L, 4L, 18L, 18L, 1L, 9L, 12L, 7L, 19L, 11L, 14L, 
16L, 4L, 4L, 10L, 11L, 16L, 9L, 11L, 16L, 1L, 18L, 2L, 2L, 10L, 
1L, 2L, 11L, 18L, 8L, 14L, 4L, 19L, 15L, 11L, 6L, 14L, 4L, 1L, 
6L, 1L, 2L, 13L, 11L, 6L, 19L, 1L, 6L, 1L, 17L, 6L, 19L, 10L, 
15L, 4L, 6L, 5L, 2L, 2L, 1L, 6L, 18L, 4L, 5L, 12L, 17L, 5L, 8L, 
2L, 3L, 4L, 14L, 5L, 13L, 3L, 2L, 5L, 13L, 8L, 8L, 7L, 4L, 7L, 
5L, 15L, 13L, 3L, 1L, 6L, 4L, 13L, 4L, 4L, 9L, 13L, 15L, 15L, 
9L, 13L, 7L, 5L, 8L, 1L, 2L, 5L, 15L, 2L, 5L, 2L, 14L, 1L, 16L, 
2L, 7L, 8L, 4L, 9L, 6L, 9L, 6L, 19L, 1L, 19L, 13L, 10L, 6L, 6L, 
16L, 10L, 16L, 6L, 8L, 11L, 2L, 16L, 9L, 15L, 18L, 3L, 10L, 14L, 
19L, 18L, 3L, 1L, 13L, 7L, 12L, 9L, 6L, 5L, 6L, 9L, 14L, 11L, 
16L, 10L, 3L, 19L, 11L, 9L, 14L, 1L, 7L, 19L, 7L, 3L, 7L, 5L, 
2L, 9L, 2L, 10L, 11L, 7L, 5L, 7L, 16L, 14L, 7L, 6L, 3L, 7L, 7L, 
14L, 3L, 7L, 4L, 10L, 17L, 10L, 19L, 9L, 8L, 9L, 1L, 14L, 8L, 
14L, 10L, 13L, 4L, 9L, 19L, 7L, 5L, 4L, 10L, 6L, 9L, 19L, 19L, 
14L, 19L, 15L, 14L, 17L, 6L, 1L, 1L, 10L, 7L, 1L, 11L, 19L, 16L, 
19L, 14L, 16L, 10L, 11L, 6L, 15L, 9L, 10L, 10L, 16L, 9L, 14L, 
14L, 7L, 15L, 5L, 1L, 7L, 5L, 2L, 10L, 2L, 19L, 11L, 7L, 11L, 
7L, 10L, 19L, 15L, 11L, 11L, 5L, 16L, 7L, 4L, 10L, 18L, 1L, 19L, 
10L, 11L, 9L, 19L, 12L, 14L, 14L, 11L, 14L, 4L, 6L, 3L, 16L, 
1L, 1L, 10L, 17L, 5L, 5L, 10L, 1L, 4L, 1L, 5L, 15L, 15L, 13L, 
4L, 14L, 2L, 11L, 4L, 17L, 7L, 11L, 1L, 1L, 15L, 1L, 10L, 11L, 
4L, 18L, 18L, 1L, 9L, 12L, 7L, 19L, 11L, 14L, 16L, 4L, 4L, 10L, 
11L, 16L, 9L, 11L, 16L, 1L, 18L, 2L, 2L, 10L, 1L, 2L, 11L, 18L, 
8L, 14L, 4L, 19L, 15L, 11L, 6L, 14L, 4L, 1L, 6L, 1L, 2L, 13L, 
11L, 6L, 19L, 1L, 6L, 1L, 17L, 6L, 19L, 10L, 15L, 4L, 6L, 5L, 
2L, 2L, 1L, 6L, 18L, 4L, 5L, 12L, 17L, 5L, 8L, 2L, 3L, 4L, 14L, 
5L, 13L, 3L, 2L, 5L, 13L, 8L, 8L, 7L, 4L, 7L, 5L, 15L, 13L, 3L, 
1L, 6L, 4L, 13L, 4L, 4L, 9L, 13L, 15L, 15L, 9L, 13L, 7L, 5L, 
8L, 1L, 2L, 5L, 15L, 2L, 5L, 2L, 14L, 1L, 16L, 2L, 7L, 8L, 4L, 
9L, 6L, 9L, 6L, 19L, 1L, 19L, 13L, 10L, 6L, 6L, 16L, 10L, 16L, 
6L, 8L, 11L, 2L, 16L, 9L, 15L, 18L, 3L, 10L, 14L, 19L, 18L, 3L, 
1L, 13L, 7L, 12L, 9L, 6L, 5L, 6L, 9L, 14L, 11L, 16L, 10L, 3L, 
19L, 11L, 9L, 14L, 1L, 7L, 19L, 7L, 3L, 7L, 5L, 2L, 9L, 2L, 10L, 
11L, 7L, 5L, 7L, 16L, 14L, 7L, 6L, 3L, 7L, 7L, 14L, 3L, 7L, 4L, 
10L, 17L, 10L, 19L, 9L, 8L, 9L, 1L, 14L, 8L, 14L, 10L, 13L, 4L, 
9L, 19L, 7L, 5L, 4L, 10L, 6L, 9L, 19L, 19L, 14L, 19L, 15L, 14L, 
17L, 6L, 1L, 1L, 10L, 7L, 1L, 11L, 19L, 16L, 19L, 14L, 16L, 10L, 
11L, 6L, 15L, 9L, 10L, 10L, 16L, 9L, 14L, 14L, 7L, 15L, 5L, 1L, 
7L, 5L, 2L, 10L, 2L, 19L, 11L, 7L, 11L, 7L, 10L, 19L, 15L, 11L, 
11L, 5L, 16L, 7L, 4L, 10L, 18L, 1L, 19L, 10L, 11L, 9L, 19L, 12L, 
14L, 14L, 11L, 14L, 4L, 6L, 3L, 16L, 1L, 1L, 10L, 17L, 5L, 5L, 
10L, 1L, 4L, 1L, 5L, 15L, 15L, 13L, 4L, 14L, 2L, 11L, 4L, 17L, 
7L, 11L, 1L), .Label = c("ALA", "ARG", "ASN", "ASP", "GLN", "GLU", 
"GLY", "HIS", "ILE", "LEU", "LYS", "MET", "PHE", "PRO", "SER", 
"THR", "TRP", "TYR", "VAL"), class = "factor"), Energy_Profile = c(-0.017, 
-0.018, -0.02, -0.021, -0.022, -0.024, -0.026, -0.027, -0.028, 
-0.028, -0.028, -0.026, -0.025, -0.024, -0.022, -0.021, -0.02, 
-0.02, -0.021, -0.022, -0.023, -0.024, -0.024, -0.026, -0.026, 
-0.025, -0.024, -0.023, -0.023, -0.022, -0.021, -0.02, -0.02, 
-0.02, -0.019, -0.018, -0.019, -0.019, -0.02, -0.02, -0.022, 
-0.023, -0.024, -0.025, -0.026, -0.027, -0.027, -0.026, -0.026, 
-0.027, -0.027, -0.027, -0.027, -0.026, -0.026, -0.025, -0.024, 
-0.022, -0.021, -0.021, -0.02, -0.02, -0.021, -0.023, -0.024, 
-0.025, -0.026, -0.027, -0.028, -0.028, -0.028, -0.027, -0.027, 
-0.027, -0.027, -0.027, -0.026, -0.026, -0.026, -0.025, -0.025, 
-0.024, -0.024, -0.024, -0.024, -0.024, -0.025, -0.026, -0.027, 
-0.028, -0.028, -0.028, -0.028, -0.028, -0.027, -0.026, -0.025, 
-0.026, -0.026, -0.025, -0.026, -0.027, -0.027, -0.027, -0.025, 
-0.024, -0.023, -0.022, -0.02, -0.019, -0.018, -0.019, -0.019, 
-0.02, -0.021, -0.022, -0.023, -0.024, -0.025, -0.027, -0.029, 
-0.031, -0.034, -0.035, -0.035, -0.035, -0.034, -0.032, -0.03, 
-0.026, -0.024, -0.023, -0.022, -0.022, -0.023, -0.024, -0.027, 
-0.029, -0.032, -0.035, -0.036, -0.037, -0.037, -0.037, -0.036, 
-0.035, -0.033, -0.032, -0.032, -0.031, -0.031, -0.032, -0.033, 
-0.034, -0.036, -0.038, -0.04, -0.041, -0.042, -0.044, -0.045, 
-0.044, -0.043, -0.041, -0.04, -0.037, -0.035, -0.032, -0.031, 
-0.029, -0.029, -0.029, -0.029, -0.03, -0.031, -0.031, -0.031, 
-0.031, -0.029, -0.027, -0.025, -0.023, -0.021, -0.019, -0.018, 
-0.017, -0.018, -0.019, -0.023, -0.026, -0.031, -0.036, -0.04, 
-0.043, -0.045, -0.044, -0.043, -0.039, -0.037, -0.033, -0.03, 
-0.028, -0.027, -0.027, -0.026, -0.025, -0.025, -0.025, -0.024, 
-0.023, -0.023, -0.024, -0.025, -0.026, -0.028, -0.029, -0.029, 
-0.029, -0.029, -0.029, -0.029, -0.028, -0.029, -0.031, -0.033, 
-0.034, -0.036, -0.037, -0.039, -0.039, -0.039, -0.038, -0.037, 
-0.036, -0.035, -0.033, -0.033, -0.032, -0.031, -0.03, -0.029, 
-0.028, -0.027, -0.025, -0.023, -0.022, -0.021, -0.02, -0.019, 
-0.019, -0.018, -0.019, -0.018, -0.018, -0.017, -0.017, -0.016, 
-0.015, -0.014, -0.013, -0.012, -0.011, -0.011, -0.013, -0.014, 
-0.017, -0.02, -0.024, -0.027, -0.03, -0.031, -0.032, -0.03, 
-0.029, -0.027, -0.025, -0.023, -0.021, -0.021, -0.022, -0.023, 
-0.025, -0.026, -0.028, -0.031, -0.033, -0.035, -0.035, -0.035, 
-0.036, -0.036, -0.034, -0.033, -0.031, -0.028, -0.025, -0.023, 
-0.021, -0.019, -0.017, -0.015, -0.014, -0.013, -0.012, -0.011, 
-0.011, -0.011, -0.012, -0.013, -0.016, -0.018, -0.02, -0.022, 
-0.024, -0.026, -0.027, -0.027, -0.026, -0.025, -0.024, -0.023, 
-0.022, -0.021, -0.02, -0.021, -0.022, -0.023, -0.024, -0.024, 
-0.024, -0.025, -0.025, -0.023, -0.022, -0.021, -0.021, -0.02, 
-0.018, -0.018, -0.018, -0.017, -0.016, -0.016, -0.016, -0.016, 
-0.016, -0.017, -0.019, -0.02, -0.021, -0.023, -0.024, -0.026, 
-0.027, -0.027, -0.027, -0.028, -0.028, -0.028, -0.028, -0.027, 
-0.026, -0.025, -0.023, -0.022, -0.02, -0.02, -0.02, -0.02, -0.021, 
-0.022, -0.023, -0.025, -0.025, -0.026, -0.026, -0.026, -0.026, 
-0.025, -0.025, -0.025, -0.025, -0.025, -0.025, -0.025, -0.025, 
-0.025, -0.025, -0.024, -0.024, -0.024, -0.024, -0.025, -0.025, 
-0.026, -0.027, -0.028, -0.028, -0.028, -0.028, -0.027, -0.027, 
-0.025, -0.025, -0.026, -0.026, -0.025, -0.026, -0.027, -0.027, 
-0.027, -0.025, -0.024, -0.023, -0.022, -0.02, -0.019, -0.018, 
-0.019, -0.019, -0.02, -0.021, -0.022, -0.023, -0.024, -0.025, 
-0.027, -0.029, -0.031, -0.034, -0.035, -0.036, -0.035, -0.034, 
-0.032, -0.03, -0.027, -0.025, -0.024, -0.023, -0.023, -0.024, 
-0.025, -0.027, -0.03, -0.032, -0.035, -0.036, -0.037, -0.037, 
-0.037, -0.036, -0.035, -0.033, -0.032, -0.032, -0.031, -0.031, 
-0.032, -0.033, -0.034, -0.036, -0.038, -0.04, -0.041, -0.042, 
-0.044, -0.044, -0.044, -0.043, -0.041, -0.039, -0.037, -0.034, 
-0.031, -0.03, -0.029, -0.028, -0.029, -0.029, -0.03, -0.031, 
-0.031, -0.032, -0.031, -0.029, -0.027, -0.025, -0.023, -0.021, 
-0.019, -0.018, -0.017, -0.018, -0.019, -0.023, -0.026, -0.031, 
-0.036, -0.04, -0.043, -0.045, -0.044, -0.043, -0.039, -0.037, 
-0.033, -0.03, -0.028, -0.027, -0.026, -0.026, -0.025, -0.025, 
-0.024, -0.023, -0.023, -0.024, -0.026, -0.027, -0.029, -0.03, 
-0.031, -0.031, -0.031, -0.03, -0.03, -0.029, -0.028, -0.029, 
-0.029, -0.031, -0.033, -0.035, -0.036, -0.039, -0.039, -0.04, 
-0.039, -0.039, -0.038, -0.037, -0.037, -0.036, -0.036, -0.035, 
-0.034, -0.032, -0.031, -0.028, -0.026, -0.024, -0.023, -0.022, 
-0.022, -0.021, -0.022, -0.022, -0.022, -0.022, -0.022, -0.021, 
-0.021, -0.02, -0.019, -0.018, -0.017, -0.015, -0.014, -0.014, 
-0.015, -0.017, -0.02, -0.023, -0.026, -0.029, -0.032, -0.033, 
-0.033, -0.031, -0.03, -0.029, -0.027, -0.025, -0.023, -0.023, 
-0.024, -0.025, -0.027, -0.029, -0.032, -0.034, -0.037, -0.039, 
-0.04, -0.041, -0.041, -0.04, -0.039, -0.036, -0.033, -0.03, 
-0.026, -0.023, -0.021, -0.019, -0.017, -0.016, -0.015, -0.015, 
-0.014, -0.014, -0.013, -0.013)), .Names = c("Model", "AA_Number", 
"AA", "Energy_Profile"), row.names = c(NA, 614L), class = "data.frame")

df_templates

structure(list(Model = 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, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 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, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2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45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 
57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 
70L, 71L, 72L, 73L, 310L, 311L, 312L, 313L, 314L, 315L, 316L, 
317L, 318L, 319L, 320L, 321L, 322L, 323L, 324L, 325L, 326L, 327L, 
328L, 329L, 330L, 331L, 332L, 333L, 334L, 335L, 336L, 337L, 338L, 
339L, 340L, 341L, 342L, 343L, 344L, 345L, 346L, 347L, 348L, 349L, 
350L, 351L, 352L, 353L, 354L, 355L, 356L, 357L, 358L, 359L, 360L, 
361L, 362L, 363L, 364L, 365L, 366L, 367L, 368L, 369L, 370L, 371L, 
372L, 373L, 374L, 375L, 376L, 377L, 378L, 379L, 380L, 115L, 116L, 
117L, 118L, 119L, 120L, 121L, 122L, 123L, 124L, 125L, 126L, 127L, 
128L, 129L, 130L, 131L, 132L, 133L, 134L, 135L, 136L, 137L, 138L, 
139L, 140L, 141L, 142L, 143L, 144L, 145L, 146L, 147L, 148L, 149L, 
150L, 148L, 150L, 151L, 153L, 154L, 155L, 156L, 157L, 158L, 159L, 
160L, 161L, 162L, 163L, 164L, 165L, 166L, 167L, 168L, 169L, 170L, 
171L, 172L, 173L, 174L, 175L, 176L, 177L, 178L, 179L, 178L, 180L, 
181L, 182L, 183L, 187L, 188L, 189L, 190L, 191L, 192L, 193L, 194L, 
195L, 196L, 197L, 198L, 199L, 200L, 201L, 202L, 203L, 204L, 205L, 
206L, 207L, 208L, 209L, 210L, 211L, 212L, 213L, 214L, 215L, 216L, 
217L, 218L, 219L, 220L, 221L, 219L, 221L, 222L, 223L, 224L, 225L, 
226L, 227L, 228L, 229L, 230L, 231L, 232L, 233L, 234L, 235L, 236L, 
237L, 238L, 239L, 240L, 241L, 242L, 243L, 244L, 245L, 246L, 247L, 
248L, 249L, 250L, 251L, 252L, 253L, 254L, 255L, 256L, 257L, 258L, 
259L, 260L, 261L, 262L, 263L, 264L, 265L, 266L, 267L, 268L, 269L, 
270L, 271L, 272L, 273L, 274L, 275L, 276L, 277L, 278L, 279L, 278L, 
280L, 281L, 282L, 283L, 284L, 285L, 286L, 287L, 288L, 289L, 290L, 
291L, 292L, 293L, 294L, 295L, 296L, 297L, 298L, 299L, 300L, 301L, 
302L, 303L, 301L, 303L, 304L, 422L, 423L, 424L, 425L, 426L, 427L, 
428L, 429L, 430L, 431L, 432L, 433L, 434L, 435L, 436L, 437L, 438L, 
439L, 440L, 441L, 442L, 443L, 444L, 445L, 446L, 447L, 448L, 449L, 
450L, 451L, 452L, 453L, 454L, 455L, 456L, 457L, 458L, 459L, 460L, 
151L, 461L, 462L, 463L, 464L, 465L, 466L, 467L, 158L, 467L, 468L, 
469L, 470L, 471L, 472L, 473L, 474L, 475L, 476L, 477L, 478L, 479L, 
480L, 481L, 482L, 483L, 484L, 485L, 176L, 485L, 486L, 487L, 488L, 
489L, 490L, 491L, 492L, 493L, 495L, 496L, 497L, 498L, 499L, 500L, 
501L, 502L, 503L, 504L, 505L, 506L, 507L, 508L, 509L, 510L, 511L, 
512L, 513L, 204L, 513L, 514L, 515L, 516L, 517L, 518L, 519L, 520L, 
521L, 522L, 523L, 524L, 525L, 526L, 527L, 528L, 529L, 530L, 531L, 
532L, 533L, 534L, 535L, 536L, 537L, 538L, 539L, 230L, 539L, 540L, 
541L, 542L, 543L, 544L, 545L, 546L, 547L, 548L, 549L, 550L, 551L, 
552L, 553L, 554L, 555L, 556L, 557L, 558L, 559L, 560L, 561L, 562L, 
563L, 564L, 565L, 566L, 567L, 568L, 571L, 572L, 573L, 574L, 575L, 
576L, 577L, 578L, 579L, 580L, 581L, 582L, 583L, 584L, 585L, 586L, 
587L, 588L, 589L, 590L, 591L, 592L, 593L, 594L, 595L, 596L, 597L, 
598L, 599L, 600L, 601L, 602L, 603L, 604L, 605L, 606L, 607L, 608L, 
609L, 610L, 611L), AA = structure(c(6L, 10L, 11L, 4L, 18L, 18L, 
1L, 9L, 12L, 7L, 19L, 11L, 14L, 16L, 4L, 4L, 10L, 11L, 16L, 9L, 
11L, 16L, 1L, 18L, 2L, 2L, 10L, 1L, 2L, 11L, 18L, 8L, 14L, 4L, 
19L, 15L, 11L, 6L, 14L, 4L, 1L, 6L, 1L, 2L, 13L, 11L, 6L, 19L, 
1L, 6L, 1L, 17L, 6L, 19L, 10L, 15L, 4L, 6L, 5L, 2L, 2L, 1L, 6L, 
18L, 4L, 5L, 12L, 17L, 5L, 8L, 2L, 6L, 10L, 11L, 4L, 18L, 18L, 
1L, 9L, 12L, 7L, 19L, 11L, 14L, 16L, 4L, 4L, 10L, 11L, 16L, 9L, 
11L, 16L, 1L, 18L, 2L, 2L, 10L, 1L, 2L, 11L, 18L, 8L, 14L, 4L, 
19L, 15L, 11L, 6L, 14L, 4L, 1L, 6L, 1L, 2L, 13L, 11L, 6L, 19L, 
1L, 6L, 1L, 17L, 6L, 19L, 10L, 15L, 4L, 6L, 5L, 2L, 2L, 1L, 6L, 
18L, 4L, 5L, 12L, 17L, 5L, 8L, 2L, 1L, 1L, 2L, 7L, 8L, 4L, 10L, 
6L, 9L, 6L, 19L, 1L, 19L, 13L, 10L, 6L, 6L, 16L, 10L, 1L, 6L, 
5L, 16L, 2L, 16L, 9L, 15L, 18L, 3L, 10L, 14L, 19L, 18L, 3L, 19L, 
13L, 13L, 13L, 7L, 9L, 6L, 15L, 6L, 16L, 14L, 11L, 16L, 10L, 
3L, 19L, 11L, 9L, 14L, 1L, 7L, 19L, 19L, 4L, 7L, 5L, 2L, 9L, 
2L, 10L, 11L, 7L, 5L, 5L, 7L, 16L, 14L, 7L, 7L, 14L, 3L, 7L, 
4L, 10L, 17L, 10L, 19L, 9L, 8L, 9L, 1L, 14L, 8L, 14L, 10L, 13L, 
4L, 9L, 19L, 7L, 8L, 3L, 10L, 6L, 9L, 19L, 10L, 14L, 10L, 1L, 
14L, 17L, 17L, 17L, 6L, 1L, 1L, 10L, 7L, 1L, 11L, 19L, 16L, 19L, 
14L, 16L, 10L, 11L, 6L, 15L, 9L, 10L, 10L, 16L, 19L, 14L, 14L, 
7L, 15L, 5L, 1L, 7L, 5L, 2L, 10L, 2L, 9L, 11L, 7L, 11L, 7L, 10L, 
19L, 15L, 11L, 16L, 8L, 16L, 7L, 4L, 10L, 13L, 1L, 19L, 9L, 11L, 
9L, 19L, 12L, 14L, 16L, 11L, 14L, 14L, 4L, 6L, 11L, 1L, 2L, 6L, 
10L, 17L, 5L, 5L, 10L, 1L, 1L, 1L, 6L, 1L, 15L, 13L, 4L, 14L, 
2L, 11L, 16L, 16L, 16L, 17L, 1L, 1L, 2L, 7L, 8L, 4L, 10L, 6L, 
9L, 6L, 19L, 1L, 19L, 13L, 10L, 6L, 6L, 16L, 10L, 1L, 6L, 5L, 
16L, 2L, 16L, 9L, 15L, 18L, 3L, 10L, 14L, 19L, 18L, 3L, 19L, 
13L, 7L, 12L, 9L, 9L, 6L, 15L, 6L, 16L, 14L, 11L, 16L, 16L, 16L, 
10L, 3L, 19L, 11L, 9L, 14L, 1L, 7L, 19L, 19L, 4L, 7L, 5L, 2L, 
9L, 2L, 10L, 11L, 11L, 11L, 7L, 5L, 7L, 16L, 14L, 7L, 6L, 3L, 
7L, 14L, 3L, 7L, 4L, 10L, 17L, 10L, 19L, 9L, 8L, 9L, 1L, 14L, 
8L, 14L, 10L, 13L, 4L, 4L, 4L, 9L, 19L, 7L, 8L, 3L, 10L, 6L, 
9L, 19L, 10L, 14L, 10L, 1L, 14L, 17L, 6L, 1L, 1L, 10L, 7L, 1L, 
11L, 19L, 16L, 19L, 14L, 14L, 14L, 16L, 10L, 11L, 6L, 15L, 9L, 
10L, 10L, 16L, 19L, 14L, 14L, 7L, 15L, 5L, 1L, 7L, 5L, 2L, 10L, 
2L, 9L, 11L, 7L, 11L, 7L, 10L, 19L, 15L, 8L, 16L, 7L, 4L, 10L, 
13L, 1L, 19L, 9L, 11L, 9L, 19L, 12L, 14L, 16L, 11L, 14L, 4L, 
6L, 11L, 1L, 2L, 6L, 10L, 17L, 5L, 5L, 10L, 1L, 1L, 1L, 6L, 1L, 
15L, 13L, 4L, 14L, 2L, 11L, 16L, 17L), .Label = c("ALA", "ARG", 
"ASN", "ASP", "GLN", "GLU", "GLY", "HIS", "ILE", "LEU", "LYS", 
"MET", "PHE", "PRO", "SER", "THR", "TRP", "TYR", "VAL"), class = "factor"), 
    Energy_Profile = c(-0.018, -0.019, -0.019, -0.02, -0.022, 
    -0.023, -0.024, -0.025, -0.025, -0.025, -0.025, -0.025, -0.025, 
    -0.026, -0.025, -0.026, -0.028, -0.029, -0.029, -0.027, -0.026, 
    -0.026, -0.026, -0.025, -0.023, -0.023, -0.024, -0.025, -0.025, 
    -0.024, -0.025, -0.025, -0.026, -0.025, -0.024, -0.024, -0.024, 
    -0.023, -0.024, -0.025, -0.025, -0.027, -0.028, -0.029, -0.029, 
    -0.029, -0.028, -0.027, -0.025, -0.023, -0.022, -0.022, -0.022, 
    -0.023, -0.024, -0.025, -0.027, -0.028, -0.029, -0.03, -0.03, 
    -0.032, -0.032, -0.033, -0.033, -0.033, -0.033, -0.033, -0.032, 
    -0.031, -0.029, -0.018, -0.019, -0.019, -0.02, -0.022, -0.023, 
    -0.024, -0.025, -0.025, -0.025, -0.025, -0.025, -0.025, -0.026, 
    -0.025, -0.026, -0.028, -0.029, -0.029, -0.027, -0.026, -0.026, 
    -0.026, -0.025, -0.023, -0.023, -0.024, -0.025, -0.025, -0.024, 
    -0.025, -0.025, -0.026, -0.025, -0.024, -0.024, -0.024, -0.023, 
    -0.024, -0.025, -0.025, -0.027, -0.028, -0.029, -0.029, -0.029, 
    -0.028, -0.027, -0.025, -0.023, -0.022, -0.022, -0.022, -0.023, 
    -0.024, -0.025, -0.027, -0.028, -0.029, -0.03, -0.03, -0.032, 
    -0.032, -0.033, -0.033, -0.033, -0.033, -0.033, -0.032, -0.031, 
    -0.029, -0.015, -0.019, -0.023, -0.026, -0.029, -0.032, -0.037, 
    -0.04, -0.044, -0.046, -0.047, -0.046, -0.046, -0.044, -0.042, 
    -0.039, -0.038, -0.037, -0.037, -0.038, -0.038, -0.039, -0.041, 
    -0.042, -0.043, -0.044, -0.044, -0.045, -0.045, -0.043, -0.035, 
    -0.024, -0.01, 0.0021, 0.014, 0.027, 0.037, 0.035, 0.026, 
    0.015, 0.0039, -0.008, -0.021, -0.032, -0.039, -0.042, -0.045, 
    -0.048, -0.049, -0.05, -0.049, -0.048, -0.046, -0.043, -0.04, 
    -0.039, -0.037, -0.036, -0.037, -0.037, -0.037, -0.035, -0.032, 
    -0.028, -0.024, -0.019, -0.012, -0.0097, -0.011, -0.013, 
    -0.014, -0.017, -0.023, -0.03, -0.035, -0.04, -0.044, -0.049, 
    -0.053, -0.055, -0.055, -0.053, -0.05, -0.048, -0.045, -0.043, 
    -0.041, -0.04, -0.041, -0.041, -0.041, -0.041, -0.042, -0.042, 
    -0.043, -0.044, -0.046, -0.047, -0.048, -0.049, -0.047, -0.042, 
    -0.038, -0.032, -0.027, -0.021, -0.015, -0.012, -0.011, -0.012, 
    -0.013, -0.015, -0.018, -0.024, -0.029, -0.034, -0.037, -0.04, 
    -0.043, -0.044, -0.045, -0.044, -0.045, -0.045, -0.045, -0.045, 
    -0.045, -0.043, -0.041, -0.039, -0.036, -0.034, -0.033, -0.033, 
    -0.034, -0.035, -0.036, -0.038, -0.039, -0.039, -0.04, -0.039, 
    -0.039, -0.039, -0.039, -0.04, -0.04, -0.039, -0.04, -0.041, 
    -0.042, -0.043, -0.044, -0.046, -0.048, -0.049, -0.05, -0.05, 
    -0.049, -0.046, -0.043, -0.037, -0.031, -0.025, -0.021, -0.017, 
    -0.015, -0.016, -0.021, -0.028, -0.034, -0.039, -0.044, -0.049, 
    -0.051, -0.049, -0.047, -0.045, -0.043, -0.04, -0.038, -0.036, 
    -0.035, -0.035, -0.033, -0.03, -0.026, -0.022, -0.017, -0.012, 
    -0.0058, -0.002, -0.0018, -0.0043, -0.0073, -0.012, -0.017, 
    -0.023, -0.029, -0.034, -0.038, -0.041, -0.044, -0.046, -0.047, 
    -0.046, -0.045, -0.043, -0.041, -0.038, -0.036, -0.034, -0.034, 
    -0.035, -0.035, -0.037, -0.039, -0.041, -0.043, -0.045, -0.046, 
    -0.047, -0.048, -0.05, -0.052, -0.054, -0.054, -0.051, -0.044, 
    -0.037, -0.027, -0.017, -0.0058, 0.0041, 0.0065, 0.0052, 
    0.0053, 0.0048, 0.0059, 0.0058, 0.0057, 0.0074, 0.007, 0.0014, 
    -0.0049, -0.015, -0.023, -0.031, -0.037, -0.04, -0.039, -0.039, 
    -0.037, -0.036, -0.034, -0.029, -0.023, -0.017, -0.009, -0.0017, 
    0.007, 0.011, 0.01, 0.0045, -0.0012, -0.0089, -0.017, -0.025, 
    -0.031, -0.033, -0.034, -0.035, -0.036, -0.038, -0.04, -0.042, 
    -0.046, -0.049, -0.052, -0.052, -0.051, -0.049, -0.046, -0.042, 
    -0.035, -0.027, -0.019, -0.013, -0.0065, -6.1e-05, 0.0045, 
    0.003, -0.0013, -0.0071, -0.014, -0.021, -0.029, -0.036, 
    -0.041, -0.044, -0.046, -0.046, -0.045, -0.044, -0.043, -0.041, 
    -0.039, -0.038, -0.038, -0.038, -0.039, -0.039, -0.038, -0.034, 
    -0.03, -0.025, -0.02, -0.013, -0.0082, -0.008, -0.011, -0.016, 
    -0.021, -0.028, -0.034, -0.04, -0.042, -0.043, -0.041, -0.04, 
    -0.038, -0.035, -0.033, -0.032, -0.032, -0.033, -0.034, -0.035, 
    -0.037, -0.038, -0.038, -0.039, -0.038, -0.038, -0.037, -0.037, 
    -0.036, -0.037, -0.036, -0.037, -0.039, -0.041, -0.043, -0.045, 
    -0.046, -0.048, -0.048, -0.047, -0.045, -0.043, -0.04, -0.038, 
    -0.037, -0.036, -0.037, -0.039, -0.041, -0.043, -0.046, -0.047, 
    -0.048, -0.048, -0.048, -0.046, -0.042, -0.04, -0.038, -0.036, 
    -0.033, -0.032, -0.031, -0.032, -0.032, -0.033, -0.034, -0.035, 
    -0.036, -0.037, -0.038, -0.039)), .Names = c("Model", "AA_Number", 
"AA", "Energy_Profile"), class = "data.frame", row.names = c(NA, 
-532L))

在我df_test在这里提供的数据中,当我达到字符限制时,我只能放置一个情节。

4

1 回答 1

1

您的数据框df_templates也是多面的,因为它具有与Model中给出的相同的列facet_wrap()。例如,如果将此列重命名为Model2

colnames(df_templates)<-c("AA_Number","AA","Energy_Profile","Model2")

那么这个数据框没有刻面。

ggplot(df_test, aes(x=AA_Number,y=Energy_Profile,col='red')) + geom_line()  + 
  geom_hline(yintercept=-0.03, colour='blue') + 
   geom_line(data=df_templates,colour="green")+
  facet_wrap(~Model,ncol=3)

在此处输入图像描述

于 2013-02-22T14:27:43.690 回答