我有以下数据文件结构:
Form invivo invitro Time Fa.IVIVC Fabs
1 1 0.00000 0.00000 0.00 Fa = m*Fd + c 26.93499
2 1 99.99999 57.00039 0.67 Fa = m*Fd + c 74.71297
3 1 100.00000 79.19487 1.33 Fa = m*Fd + c 93.31648
4 1 100.00000 89.94020 2.00 Fa = m*Fd + c 102.32326
5 1 100.00000 94.48189 2.67 Fa = m*Fd + c 106.13013
6 1 100.00000 96.53548 3.33 Fa = m*Fd + c 107.85145
我使用dput()粘贴了这个问题末尾的整个数据框,以便您可以重现我的示例。我的示例假设您将dput输出分配给对象df。
我想绘制专栏" invivo"作为Y轴反对" invitro"作为X轴,通过列#34的形式着色;形式"我在gpplot2调用中为其分配了适当的标签(见下文)。然后,我在该图上叠加了由列的一部分指定的一系列行" Fabs"反对" invitro"线型由#34; Fa.IVIVC"列确定。以下是我用于创建绘图的命令,后跟结果:
library(ggplot2)
> ggplot() + geom_point(data = df, aes(x = invitro, y = invivo,
+ colour = factor(Form, labels = c("Fast", "Medium", "Slow")))) +
+ geom_line(data = subset(df, Form == 3 & `Fa.IVIVC` != "Sigmoid" &
+ `Fa.IVIVC` != "DWeibull"), aes(x = invitro, y = Fabs, linetype = `Fa.IVIVC`)) +
+ labs(title = "Plot", colour = "Formulation") +
+ scale_x_continuous(limits = c(0, 100)) + scale_y_continuous(limits = c(0, 100)) +
+ theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
+ panel.background = element_blank(), axis.line = element_line(colour = "black"))
有人可以告诉我如何手动更改两行(八分之一)的线宽以使它们更突出吗?谢谢。
> dput(df)
structure(list(Form = c(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, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L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, 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, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 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, 2L, 2L, 2L, 2L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 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, 2L, 2L, 2L, 2L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 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, 2L,
2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L), invivo = c(0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 0, 99.99998579, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 0, 13.0348383,
23.19770255, 95.89812941, 99.94931988, 99.99614995, 99.99979491,
99.99999186, 99.99999974, 99.99999999, 100, 100, 100, 100, 100,
100, 100, 0, 2.069875621, 6.072987344, 43.35498005, 96.60344484,
99.99980946, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989, 99.99994989, 99.99994989, 99.99994989,
99.99994989, 99.99994989), invitro = c(0, 57.00039229, 79.19486901,
89.94020448, 94.48189406, 96.53547792, 97.6846376, 98.40076271,
98.8676286, 99.19033157, 99.41366963, 99.56873896, 99.68122405,
99.86434085, 99.93886517, 99.98592267, 99.99895618, 0, 13.96103106,
28.91044539, 43.21827297, 55.60380457, 65.56707672, 73.47911752,
79.47296755, 83.87519276, 87.18727142, 89.64789772, 91.47785689,
92.90936128, 95.67702506, 97.26097381, 98.86512577, 99.79579063,
0, 3.232083127, 9.730153549, 18.07219246, 27.12446726, 35.98788691,
44.41521695, 51.96255092, 58.40744672, 63.94025941, 68.53310823,
72.25691906, 75.35971576, 81.78318811, 85.74014133, 90.29959282,
93.32240733, 0, 57.00039229, 79.19486901, 89.94020448, 94.48189406,
96.53547792, 97.6846376, 98.40076271, 98.8676286, 99.19033157,
99.41366963, 99.56873896, 99.68122405, 99.86434085, 99.93886517,
99.98592267, 99.99895618, 0, 13.96103106, 28.91044539, 43.21827297,
55.60380457, 65.56707672, 73.47911752, 79.47296755, 83.87519276,
87.18727142, 89.64789772, 91.47785689, 92.90936128, 95.67702506,
97.26097381, 98.86512577, 99.79579063, 0, 3.232083127, 9.730153549,
18.07219246, 27.12446726, 35.98788691, 44.41521695, 51.96255092,
58.40744672, 63.94025941, 68.53310823, 72.25691906, 75.35971576,
81.78318811, 85.74014133, 90.29959282, 93.32240733, 0, 57.00039229,
79.19486901, 89.94020448, 94.48189406, 96.53547792, 97.6846376,
98.40076271, 98.8676286, 99.19033157, 99.41366963, 99.56873896,
99.68122405, 99.86434085, 99.93886517, 99.98592267, 99.99895618,
0, 13.96103106, 28.91044539, 43.21827297, 55.60380457, 65.56707672,
73.47911752, 79.47296755, 83.87519276, 87.18727142, 89.64789772,
91.47785689, 92.90936128, 95.67702506, 97.26097381, 98.86512577,
99.79579063, 0, 3.232083127, 9.730153549, 18.07219246, 27.12446726,
35.98788691, 44.41521695, 51.96255092, 58.40744672, 63.94025941,
68.53310823, 72.25691906, 75.35971576, 81.78318811, 85.74014133,
90.29959282, 93.32240733, 0, 57.00039229, 79.19486901, 89.94020448,
94.48189406, 96.53547792, 97.6846376, 98.40076271, 98.8676286,
99.19033157, 99.41366963, 99.56873896, 99.68122405, 99.86434085,
99.93886517, 99.98592267, 99.99895618, 0, 13.96103106, 28.91044539,
43.21827297, 55.60380457, 65.56707672, 73.47911752, 79.47296755,
83.87519276, 87.18727142, 89.64789772, 91.47785689, 92.90936128,
95.67702506, 97.26097381, 98.86512577, 99.79579063, 0, 3.232083127,
9.730153549, 18.07219246, 27.12446726, 35.98788691, 44.41521695,
51.96255092, 58.40744672, 63.94025941, 68.53310823, 72.25691906,
75.35971576, 81.78318811, 85.74014133, 90.29959282, 93.32240733,
0, 57.00039229, 79.19486901, 89.94020448, 94.48189406, 96.53547792,
97.6846376, 98.40076271, 98.8676286, 99.19033157, 99.41366963,
99.56873896, 99.68122405, 99.86434085, 99.93886517, 99.98592267,
99.99895618, 0, 13.96103106, 28.91044539, 43.21827297, 55.60380457,
65.56707672, 73.47911752, 79.47296755, 83.87519276, 87.18727142,
89.64789772, 91.47785689, 92.90936128, 95.67702506, 97.26097381,
98.86512577, 99.79579063, 0, 3.232083127, 9.730153549, 18.07219246,
27.12446726, 35.98788691, 44.41521695, 51.96255092, 58.40744672,
63.94025941, 68.53310823, 72.25691906, 75.35971576, 81.78318811,
85.74014133, 90.29959282, 93.32240733, 0, 57.00039229, 79.19486901,
89.94020448, 94.48189406, 96.53547792, 97.6846376, 98.40076271,
98.8676286, 99.19033157, 99.41366963, 99.56873896, 99.68122405,
99.86434085, 99.93886517, 99.98592267, 99.99895618, 0, 13.96103106,
28.91044539, 43.21827297, 55.60380457, 65.56707672, 73.47911752,
79.47296755, 83.87519276, 87.18727142, 89.64789772, 91.47785689,
92.90936128, 95.67702506, 97.26097381, 98.86512577, 99.79579063,
0, 3.232083127, 9.730153549, 18.07219246, 27.12446726, 35.98788691,
44.41521695, 51.96255092, 58.40744672, 63.94025941, 68.53310823,
72.25691906, 75.35971576, 81.78318811, 85.74014133, 90.29959282,
93.32240733, 0, 57.00039229, 79.19486901, 89.94020448, 94.48189406,
96.53547792, 97.6846376, 98.40076271, 98.8676286, 99.19033157,
99.41366963, 99.56873896, 99.68122405, 99.86434085, 99.93886517,
99.98592267, 99.99895618, 0, 13.96103106, 28.91044539, 43.21827297,
55.60380457, 65.56707672, 73.47911752, 79.47296755, 83.87519276,
87.18727142, 89.64789772, 91.47785689, 92.90936128, 95.67702506,
97.26097381, 98.86512577, 99.79579063, 0, 3.232083127, 9.730153549,
18.07219246, 27.12446726, 35.98788691, 44.41521695, 51.96255092,
58.40744672, 63.94025941, 68.53310823, 72.25691906, 75.35971576,
81.78318811, 85.74014133, 90.29959282, 93.32240733, 0, 57.00039229,
79.19486901, 89.94020448, 94.48189406, 96.53547792, 97.6846376,
98.40076271, 98.8676286, 99.19033157, 99.41366963, 99.56873896,
99.68122405, 99.86434085, 99.93886517, 99.98592267, 99.99895618,
0, 13.96103106, 28.91044539, 43.21827297, 55.60380457, 65.56707672,
73.47911752, 79.47296755, 83.87519276, 87.18727142, 89.64789772,
91.47785689, 92.90936128, 95.67702506, 97.26097381, 98.86512577,
99.79579063, 0, 3.232083127, 9.730153549, 18.07219246, 27.12446726,
35.98788691, 44.41521695, 51.96255092, 58.40744672, 63.94025941,
68.53310823, 72.25691906, 75.35971576, 81.78318811, 85.74014133,
90.29959282, 93.32240733, 0, 57.00039229, 79.19486901, 89.94020448,
94.48189406, 96.53547792, 97.6846376, 98.40076271, 98.8676286,
99.19033157, 99.41366963, 99.56873896, 99.68122405, 99.86434085,
99.93886517, 99.98592267, 99.99895618, 0, 13.96103106, 28.91044539,
43.21827297, 55.60380457, 65.56707672, 73.47911752, 79.47296755,
83.87519276, 87.18727142, 89.64789772, 91.47785689, 92.90936128,
95.67702506, 97.26097381, 98.86512577, 99.79579063, 0, 3.232083127,
9.730153549, 18.07219246, 27.12446726, 35.98788691, 44.41521695,
51.96255092, 58.40744672, 63.94025941, 68.53310823, 72.25691906,
75.35971576, 81.78318811, 85.74014133, 90.29959282, 93.32240733,
0, 57.00039229, 79.19486901, 89.94020448, 94.48189406, 96.53547792,
97.6846376, 98.40076271, 98.8676286, 99.19033157, 99.41366963,
99.56873896, 99.68122405, 99.86434085, 99.93886517, 99.98592267,
99.99895618, 0, 13.96103106, 28.91044539, 43.21827297, 55.60380457,
65.56707672, 73.47911752, 79.47296755, 83.87519276, 87.18727142,
89.64789772, 91.47785689, 92.90936128, 95.67702506, 97.26097381,
98.86512577, 99.79579063, 0, 3.232083127, 9.730153549, 18.07219246,
27.12446726, 35.98788691, 44.41521695, 51.96255092, 58.40744672,
63.94025941, 68.53310823, 72.25691906, 75.35971576, 81.78318811,
85.74014133, 90.29959282, 93.32240733), Time = c(0, 0.67, 1.33,
2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24,
0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8,
10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33,
6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33,
4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33,
2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24,
0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8,
10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33,
6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33,
4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33,
2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24,
0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8,
10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33,
6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33,
4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33,
2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24,
0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8,
10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33,
6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33,
4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33,
2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24,
0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8,
10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33,
6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33,
4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33,
2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24,
0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8,
10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33,
6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33,
4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33,
2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24,
0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8,
10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33,
6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33, 2, 2.67, 3.33,
4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24, 0, 0.67, 1.33,
2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8, 10, 12, 16, 24,
0, 0.67, 1.33, 2, 2.67, 3.33, 4, 4.67, 5.33, 6, 6.67, 7.33, 8,
10, 12, 16, 24), Fa.IVIVC = structure(c(3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
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6L, 6L, 6L, 6L,
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
7L, 7L, 7L, 7L), .Label = c("DWeibull", "Fa = Fd", "Fa = m*Fd + c",
"polyx2", "polyx3", "powerlaw", "Sigmoid", "SWeibull", "Time scale 1",
"Time scale 2"), class = "factor"), Fabs = c(26.93499216, 74.71296886,
93.31647577, 102.3232627, 106.1301267, 107.8514496, 108.8146802,
109.4149394, 109.8062684, 110.0767594, 110.2639624, 110.3939422,
110.4882277, 110.641717, 110.7041836, 110.7436274, 110.7545521,
26.93499216, 38.63718911, 51.16785321, 63.16073651, 73.54234296,
81.89360101, 88.52550802, 93.54957918, 97.23954349, 100.0157422,
102.0782499, 103.6121296, 104.8120228, 107.1318906, 108.4595634,
109.8041705, 110.5842579, 26.93499216, 29.64413829, 35.09084918,
42.08318248, 49.67083858, 57.10019548, 64.16402016, 70.49022832,
75.89236801, 80.52999567, 84.37974152, 87.50105595, 90.10183364,
95.4860161, 98.80275149, 102.6245036, 105.1582398, 0, 57.00039229,
79.19486901, 89.94020448, 94.48189406, 96.53547792, 97.6846376,
98.40076271, 98.8676286, 99.19033157, 99.41366963, 99.56873896,
99.68122405, 99.86434085, 99.93886517, 99.98592267, 99.99895618,
0, 13.96103106, 28.91044539, 43.21827297, 55.60380457, 65.56707672,
73.47911752, 79.47296755, 83.87519276, 87.18727142, 89.64789772,
91.47785689, 92.90936128, 95.67702506, 97.26097381, 98.86512577,
99.79579063, 0, 3.232083127, 9.730153549, 18.07219246, 27.12446726,
35.98788691, 44.41521695, 51.96255092, 58.40744672, 63.94025941,
68.53310823, 72.25691906, 75.35971576, 81.78318811, 85.74014133,
90.29959282, 93.32240733, 0, 70.50447835, 96.02300982, 98.82243596,
99.57985237, 99.83224857, 99.92919375, 99.96848155, 99.98519963,
99.99288753, 99.99648008, 99.99819557, 99.99906402, 99.999853,
99.99997375, 99.99999889, 100, 0, 21.86821136, 62.64275076, 83.43020069,
91.61448073, 95.12048033, 97.01847895, 98.14482018, 98.82926092,
99.26289099, 99.5340886, 99.70248132, 99.81071816, 99.9501482,
99.9866099, 99.99898898, 99.99999343, 0, 6.376662203, 33.21129772,
57.71307085, 72.54593643, 80.44991197, 85.11225796, 88.14463787,
90.18710253, 91.58353207, 92.48469374, 93.03463954, 93.36622665,
93.71057243, 93.75808722, 93.76330413, 93.76332734, 0, 85.43897863,
96.41023147, 98.60292696, 99.38648274, 99.70817136, 99.85563995,
99.92570047, 99.96014456, 99.97824987, 99.98785551, 99.99302561,
99.9959588, 99.99913591, 99.99979511, 99.99998555, 99.99999987,
0, 35.93136721, 64.82067498, 81.32770255, 89.33896526, 93.27233957,
95.52120571, 96.93468939, 97.86725864, 98.51674213, 98.96506419,
99.27211617, 99.48961576, 99.82099549, 99.93627731, 99.99163908,
99.99984083, 0, 13.56359537, 35.26384187, 54.5683418, 67.93117043,
76.17184672, 81.40766037, 84.89769958, 87.36608189, 89.23071681,
90.61604011, 91.61400422, 92.33688852, 93.39590992, 93.68490622,
93.76120164, 93.7633271, -3.734858599, 98.11558593, 105.8100892,
103.098802, 100.6902735, 99.35493052, 98.54076048, 98.00910082,
97.65245063, 97.40129654, 97.22525874, 97.10196412, 97.01198065,
96.86451038, 96.80414422, 96.76592267, 96.75532221, -3.734858599,
32.13807789, 62.69125386, 84.32082969, 97.03227093, 103.2085292,
105.5413274, 105.7928536, 105.1453404, 104.1935427, 103.2281213,
102.3673602, 101.6091192, 99.93179657, 98.84651217, 97.65438373,
96.91985905, -3.734858599, 5.20059021, 22.01543783, 41.35062939,
59.46864426, 74.32100644, 85.7928042, 93.87421248, 99.13528256,
102.4466828, 104.3498116, 105.3296581, 105.760912, 105.5409361,
104.6584848, 102.935546, 101.3764816, -7.829154332, 98.13891119,
102.6750962, 101.2547046, 100.2538484, 99.75104793, 99.45941539,
99.27457128, 99.15293366, 99.06837985, 99.00964798, 98.96877114,
98.93907126, 98.89063804, 98.87089782, 98.85842466, 98.85496882,
-7.829154332, 35.33293502, 67.73270358, 87.50585713, 97.38254122,
101.420433, 102.6533246, 102.6603132, 102.2559064, 101.7645809,
101.3127228, 100.9357618, 100.6197217, 99.96433979, 99.56768877,
99.15358796, 98.90878113, -7.829154332, 3.377571602, 23.66261666,
45.57203407, 64.53791341, 78.75335477, 88.72896415, 95.08899477,
98.83482923, 100.9657347, 102.0648218, 102.560815, 102.732557,
102.4865711, 101.9970047, 101.1821951, 100.5254111, 0, 84.36578127,
96.62610582, 101.8342357, 103.9253297, 104.8514595, 105.3646665,
105.6826915, 105.8892912, 106.0317605, 106.1302021, 106.1984762,
106.2479622, 106.3284514, 106.3611838, 106.3818449, 106.3875664,
0, 47.21500715, 63.75590158, 75.26043311, 83.50667334, 89.38324247,
93.68522412, 96.76596308, 98.94262678, 100.536392, 101.6975478,
102.549008, 103.2081215, 104.465734, 105.1758759, 105.8881852,
106.2983302, 0, 25.8163831, 40.68030992, 52.52070119, 62.10032081,
69.78465323, 76.11355987, 81.20537082, 85.21891334, 88.46143461,
91.02992379, 93.03909356, 94.66721252, 97.91683115, 99.84448999,
102.001935, 103.3971916, 0, 99.56457982, 99.99802545, 99.99992484,
99.9999834, 99.99999182, 99.99999453, 99.99999576, 99.99999641,
99.9999968, 99.99999704, 99.9999972, 99.99999732, 99.99999749,
99.99999755, 99.99999759, 99.99999761, 0, 19.11114181, 71.01341084,
95.06173422, 99.42484828, 99.93262192, 99.99056197, 99.99817581,
99.99949882, 99.99981915, 99.99991739, 99.99995454, 99.99997175,
99.99998898, 99.99999365, 99.9999964, 99.99999742, 0, 0, 7.282480451,
33.63646335, 65.74582364, 86.70632144, 95.8867423, 98.85159499,
99.67345715, 99.90193231, 99.96686136, 99.98701824, 99.9942833,
99.99906565, 99.99971627, 99.99993312, 99.99997541, 0, 99.886109,
100.1504034, 100.1506771, 100.15068, 100.1506803, 100.1506803,
100.1506804, 100.1506804, 100.1506804, 100.1506804, 100.1506804,
100.1506804, 100.1506804, 100.1506804, 100.1506804, 100.1506804,
0, 19.5867998, 70.37010127, 95.67671894, 99.78107909, 100.1240798,
100.1485194, 100.1504311, 100.1506363, 100.1506694, 100.1506767,
100.1506788, 100.1506796, 100.1506802, 100.1506803, 100.1506804,
100.1506804, 0, 0.235243688, 8.697988318, 33.12947181, 64.90643719,
86.93825543, 96.50612289, 99.31146174, 99.9638777, 100.1081475,
100.1398273, 100.1474151, 100.149556, 100.1505783, 100.15066,
100.1506776, 100.1506797, 0, 98.42377658, 99.7202431, 99.85721623,
99.88997474, 99.90180755, 99.90776818, 99.91126546, 99.9134607,
99.91494041, 99.91594691, 99.91663742, 99.9171341, 99.91793515,
99.91825853, 99.91846194, 99.91851817, 0, 3.497315952, 63.14218992,
93.51151385, 98.20640473, 99.24296724, 99.58454984, 99.72537567,
99.79345734, 99.83170076, 99.8547364, 99.8694627, 99.87975728,
99.89705477, 99.90562207, 99.91344911, 99.91763636, 0, 0.001560482,
0.532489605, 12.45115995, 54.99690953, 84.53081847, 94.33616843,
97.45209375, 98.61212509, 99.13613618, 99.40017939, 99.54612357,
99.63641308, 99.76395907, 99.81612695, 99.8601966, 99.88254639
)), .Names = c("Form", "invivo", "invitro", "Time", "Fa.IVIVC",
"Fabs"), class = "data.frame", row.names = c(NA, -510L))
答案 0 :(得分:1)
我已经使用dplyr::mutate()
为您Highlight
的数据添加geom_line()
列,然后我使用了scale_size_manual()
来在TRUE
列中指定FALSE
或Highlight
的宽度。最后guides()
用于隐藏尺寸美学的图例。
df <- dget("~/Desktop/data.txt")
library(ggplot2)
library(dplyr)
line_data <- subset(df, Form == 3 & `Fa.IVIVC` != "Sigmoid" & `Fa.IVIVC` != "DWeibull") %>%
mutate(Highlight = Fa.IVIVC == "Fa = Fd" | Fa.IVIVC == "powerlaw")
head(line_data)
#> Form invivo invitro Time Fa.IVIVC Fabs Highlight
#> 1 3 0.000000 0.000000 0.00 Fa = m*Fd + c 26.93499 FALSE
#> 2 3 2.069876 3.232083 0.67 Fa = m*Fd + c 29.64414 FALSE
#> 3 3 6.072987 9.730154 1.33 Fa = m*Fd + c 35.09085 FALSE
#> 4 3 43.354980 18.072192 2.00 Fa = m*Fd + c 42.08318 FALSE
#> 5 3 96.603445 27.124467 2.67 Fa = m*Fd + c 49.67084 FALSE
#> 6 3 99.999809 35.987887 3.33 Fa = m*Fd + c 57.10020 FALSE
ggplot() +
geom_point(data = df, aes(
x = invitro,
y = invivo,
colour = factor(Form, labels = c("Fast", "Medium", "Slow"))
)) +
geom_line(
data = line_data,
aes(x = invitro, y = Fabs, linetype = `Fa.IVIVC`, size = Highlight)
) +
labs(title = "Plot", colour = "Formulation") +
scale_x_continuous(limits = c(0, 100)) +
scale_y_continuous(limits = c(0, 100)) +
guides(size = FALSE) +
scale_size_manual(values = c("TRUE" = 2, "FALSE" = 0.5)) +
theme(
panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.background = element_blank(), axis.line = element_line(colour = "black")
)
如果您愿意,也可以使用dplyr::filter()
代替subset()
来设置line_data
。
line_data <- df %>%
filter(Form == 3, Fa.IVIVC != 'Sigmoid', Fa.IVIVC != 'DWeibull') %>%
mutate(Highlight = Fa.IVIVC == "Fa = Fd" | Fa.IVIVC == "powerlaw")