我有几个要针对变量distance
绘制的变量。另外,我希望能够将它们彼此进行比较,但这有点困难,因为它们的大小不同。
来自r-bloggers?还是您可能知道一个不错的剧情选择?
数据:
structure(list(distance = c(50, 45, 40, 35, 30, 25, 20, 19, 18,
17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0.9,
0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.19, 0.18, 0.17, 0.16, 0.15,
0.14, 0.13, 0.12, 0.11, 0.1, 0.09, 0.08, 0.07, 0.06, 0.05, 0.04,
0.03, 0.02), Vertices = c(1000, 1000, 1000, 1000, 1000, 1000,
1000, 1000, 1000, 998, 998, 998, 998, 998, 998, 998, 998, 998,
998, 998, 998, 998, 996, 994, 994, 988, 984, 980, 976, 950, 916,
832, 646, 304, 268, 224, 190, 150, 126, 108, 92, 78, 64, 58,
40, 24, 20, 14, 6, 4, 2, 0), Removed_edges = c(0, 0, 0, 0, 0,
1, 663, 968, 1000, 1006, 1011, 1013, 1013, 1041, 1459, 2436,
4050, 4856, 5381, 6633, 8126, 10241, 24489, 109694, 304123, 469203,
476542, 482569, 487609, 491727, 494878, 497084, 498533, 499262,
499307, 499349, 499381, 499409, 499431, 499443, 499451, 499459,
499466, 499470, 499479, 499488, 499490, 499493, 499497, 499498,
499499, 499500), Available_edges = c(499500, 499500, 499500,
499500, 499500, 499499, 498837, 498532, 498500, 498494, 498489,
498487, 498487, 498459, 498041, 497064, 495450, 494644, 494119,
492867, 491374, 489259, 475011, 389806, 195377, 30297, 22958,
16931, 11891, 7773, 4622, 2416, 967, 238, 193, 151, 119, 91,
69, 57, 49, 41, 34, 30, 21, 12, 10, 7, 3, 2, 1, 0), cost = c(370.653,
370.653, 370.653, 370.653, 370.653, 370.653, 370.653, 370.653,
370.653, 344.976, 344.976, 344.976, 344.976, 344.976, 344.976,
344.976, 344.976, 344.976, 344.976, 344.976, 344.976, 341.461,
347.306, 347.306, 344.9, 329.786, 312.29, 273.149, 251.378, 210.027,
170.599, 125.637, 74.8589, 23.4161, 19.9189, 15.4505, 12.2194,
8.6815, 6.69209, 5.31103, 4.23847, 3.34457, 2.53624, 2.22116,
1.35043, 0.664801, 0.510447, 0.316374, 0.0903024, 0.0478013,
0.0139598, 0), cost_adj = c(370.653, 370.653, 370.653, 370.653,
370.653, 370.653, 370.653, 370.653, 370.653, 346.976, 346.976,
346.976, 346.976, 346.976, 346.976, 346.976, 346.976, 346.976,
346.976, 346.976, 346.976, 343.461, 351.306, 353.306, 350.9,
341.786, 328.29, 293.149, 275.378, 260.027, 254.599, 293.637,
428.8589, 719.4161, 751.9189, 791.4505, 822.2194, 858.6815, 880.69209,
897.31103, 912.23847, 925.34457, 938.53624, 944.22116, 961.35043,
976.664801, 980.510447, 986.316374, 994.0903024, 996.0478013,
998.0139598, 1000), median = c(0.7193121, 0.7193121, 0.7193121,
0.7193121, 0.7193121, 0.7193121, 0.7193121, 0.7193121, 0.7193121,
0.7043872, 0.7043872, 0.7043872, 0.7043872, 0.7043872, 0.7043872,
0.7043872, 0.7043872, 0.7043872, 0.7043872, 0.7043872, 0.7043872,
0.6976425, 0.7203216, 0.7203216, 0.7199486, 0.7003339, 0.6794477,
0.5876977, 0.5455088, 0.4745327, 0.3928961, 0.3247046, 0.2402604,
0.1670641, 0.1627094, 0.1520045, 0.138773, 0.123037, 0.1111772,
0.09881222, 0.09631985, 0.08934352, 0.08633746, 0.08542623, 0.07180905,
0.05810843, 0.05664605, 0.05375063, 0.03384152, 0.02390067, 0.01395982,
0), iqr = c(0.3749765, 0.3749765, 0.3749765, 0.3749765, 0.3749765,
0.3749765, 0.3749765, 0.3749765, 0.3749765, 0.3746649, 0.3746649,
0.3746649, 0.3746649, 0.3746649, 0.3746649, 0.3746649, 0.3746649,
0.3746649, 0.3746649, 0.3746649, 0.3746649, 0.3779179, 0.3671259,
0.3671259, 0.3675734, 0.3784318, 0.3081306, 0.2648424, 0.2119437,
0.1777727, 0.1436352, 0.1137198, 0.07289936, 0.05379948, 0.05185602,
0.0574157, 0.05868708, 0.05687079, 0.04522607, 0.0396385, 0.03395707,
0.02818766, 0.03263013, 0.031834, 0.02873434, 0.01364959, 0.01656083,
0.01847473, 0.01427064, 0.009940847, 0, 0), min = c(0.09465671,
0.09465671, 0.09465671, 0.09465671, 0.09465671, 0.09465671, 0.09465671,
0.09465671, 0.09465671, 0.09465671, 0.09465671, 0.09465671, 0.09465671,
0.09465671, 0.09465671, 0.09465671, 0.09465671, 0.09465671, 0.09465671,
0.09465671, 0.09465671, 0.09465671, 0.1058249, 0.1058249, 0.1058249,
0.09465671, 0.06355059, 0.06355059, 0.06355059, 0.08301156, 0.03384152,
0.05902917, 0.01395982, 0.01395982, 0.01395982, 0.01395982, 0.01395982,
0.01395982, 0.01395982, 0.01395982, 0.01395982, 0.01395982, 0.01395982,
0.01395982, 0.01395982, 0.01395982, 0.01395982, 0.01395982, 0.01395982,
0.01395982, 0.01395982, 0), max = c(17.77844208, 17.77844208,
17.77844208, 17.77844208, 17.77844208, 17.77844208, 17.77844208,
17.77844208, 17.77844208, 5.36268142, 5.36268142, 5.36268142,
5.36268142, 5.36268142, 5.36268142, 5.36268142, 5.36268142, 5.36268142,
5.36268142, 5.36268142, 5.36268142, 4.34970133, 2.4067181, 2.4067181,
1.8043306, 0.99891794, 0.89878447, 0.799641, 0.69938204, 0.5999397,
0.49977768, 0.39957404, 0.29975985, 0.19987412, 0.18979907, 0.17988976,
0.16821759, 0.15954502, 0.14899043, 0.13877301, 0.12997926, 0.11962987,
0.10877292, 0.0995132, 0.08934352, 0.07843555, 0.0676996, 0.05902917,
0.04250111, 0.03384152, 0.01395982, 0), mean = c(0.7413068, 0.7413068,
0.7413068, 0.7413068, 0.7413068, 0.7413068, 0.7413068, 0.7413068,
0.7413068, 0.6913354, 0.6913354, 0.6913354, 0.6913354, 0.6913354,
0.6913354, 0.6913354, 0.6913354, 0.6913354, 0.6913354, 0.6913354,
0.6913354, 0.6842908, 0.6974025, 0.6974025, 0.6939632, 0.667584,
0.6347348, 0.5574473, 0.515118, 0.4421626, 0.3724864, 0.3020119,
0.2317612, 0.1540534, 0.1486486, 0.1379508, 0.1286255, 0.1157533,
0.1062236, 0.09835248, 0.09214075, 0.0857582, 0.07925751, 0.0765918,
0.06752173, 0.05540011, 0.05104472, 0.04519633, 0.03010081, 0.02390067,
0.01395982, 0), std = c(0.8864041, 0.8864041, 0.8864041, 0.8864041,
0.8864041, 0.8864041, 0.8864041, 0.8864041, 0.8864041, 0.3319887,
0.3319887, 0.3319887, 0.3319887, 0.3319887, 0.3319887, 0.3319887,
0.3319887, 0.3319887, 0.3319887, 0.3319887, 0.3319887, 0.309771,
0.2485103, 0.2485103, 0.2365996, 0.2317995, 0.1994314, 0.1760748,
0.1430734, 0.1230979, 0.09761741, 0.07779096, 0.05218991, 0.04028708,
0.03806269, 0.03837218, 0.03581113, 0.03550626, 0.03184689, 0.02945863,
0.02708977, 0.0247326, 0.02246103, 0.02188115, 0.02061182, 0.01807177,
0.01650302, 0.01652885, 0.01463372, 0.01405848, 0, 0)), .Names = c("distance",
"Vertices", "Removed_edges", "Available_edges", "cost", "cost_adj",
"median", "iqr", "min", "max", "mean", "std"), row.names = c(NA,
-52L), class = "data.frame")
edit:我不认为这是一个重复的问题,因为链接的问题旨在仅绘制“两个” y轴。我需要十个。或另一个绘图选项。问题中的答案甚至都没有显示如何仅添加第二个y轴,该第二个y轴仅取决于主轴。