在markdown中绘制并排图时遇到问题,相反,它们是一个接一个的。
{r fn, fig.show = "hold", warning=FALSE, message=FALSE,fig.width=5, fig.height=5, fig.path='figures/', dev=c('png', 'pdf')}
这是生成绘图的代码,很抱歉。我在文档中还有一些图,它们全部以我希望它们工作的方式工作(使用par
或只是使用markdown来将它们堆叠在一起)。我怀疑这与绘图代码有关。
list(structure(list(data = structure(list(model = c("90_10_12_rain",
"90_10_12_rain", "90_10_12_rain", "90_10_12_rain", "90_10_12_rain",
"90_10_12_rain", "90_10_12_rain", "90_10_12_rain", "90_10_12_rain",
"90_10_12_rain", "90_10_12_rain", "90_10_12_rain", "90_10_12_rain",
"90_10_12_rain", "90_10_12_rain", "90_10_12_rain", "90_10_12_rain",
"90_10_12_rain", "90_10_12_rain", "90_10_12_rain"), sens = c(0,
0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4,
0.5, 0.6, 0.6, 0.7, 0.8, 1), one_min_spec = c(0, 0.0412371134020618,
0.0412371134020618, 0.0412371134020618, 0.0824742268041238, 0.0824742268041238,
0.0824742268041238, 0.0824742268041238, 0.103092783505155, 0.103092783505155,
0.123711340206186, 0.144329896907217, 0.164948453608247, 0.175257731958763,
0.195876288659794, 0.237113402061856, 0.283505154639175, 0.319587628865979,
0.373711340206186, 1), cut_point = c(NA, 18L, 17L, 16L, 15L,
14L, 13L, 12L, 11L, 10L, 9L, 8L, 7L, 6L, 5L, 4L, 3L, 2L, 1L,
NA)), row.names = c(1L, 11834L, 11148L, 10462L, 9776L, 9090L,
8404L, 7718L, 7032L, 6346L, 5660L, 4974L, 4288L, 3602L, 2916L,
2230L, 1544L, 858L, 172L, 20L), class = "data.frame"), layers = list(
<environment>, <environment>, <environment>, <environment>,
<environment>), scales = <environment>, mapping = structure(list(
x = ~one_min_spec, y = ~sens, label = ~cut_point), class = "uneval"),
theme = structure(list(line = structure(list(colour = "black",
size = 0.5, linetype = 1, lineend = "butt", arrow = FALSE,
inherit.blank = TRUE), class = c("element_line", "element"
)), rect = structure(list(fill = "white", colour = "black",
size = 0.5, linetype = 1, inherit.blank = TRUE), class = c("element_rect",
"element")), text = structure(list(family = "", face = "plain",
colour = "black", size = 14, hjust = 0.5, vjust = 0.5,
angle = 0, lineheight = 0.9, margin = structure(c(0,
0, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = FALSE, inherit.blank = FALSE), class = c("element_text",
"element")), axis.title.x = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(2.75,
0, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.title.x.top = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 2.75, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.title.y = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 1, angle = 90, lineheight = NULL, margin = structure(c(0,
2.75, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.title.y.right = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = -90, lineheight = NULL, margin = structure(c(0,
0, 0, 2.75), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text = structure(list(family = NULL, face = NULL,
colour = "grey30", size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(2.2,
0, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x.top = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 2.2, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.y = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = 1, vjust = NULL,
angle = NULL, lineheight = NULL, margin = structure(c(0,
2.2, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.y.right = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = 0, vjust = NULL,
angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 0, 2.2), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.ticks = structure(list(colour = "grey20",
size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE,
inherit.blank = TRUE), class = c("element_line", "element"
)), axis.ticks.length = structure(2.75, class = "unit", valid.unit = 8L, unit = "pt"),
axis.line = structure(list(), class = c("element_blank",
"element")), axis.line.x = NULL, axis.line.y = NULL,
legend.background = structure(list(fill = NULL, colour = NA,
size = NULL, linetype = NULL, inherit.blank = TRUE), class = c("element_rect",
"element")), legend.margin = structure(c(5.5, 5.5, 5.5,
5.5), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
legend.spacing = structure(11, class = "unit", valid.unit = 8L, unit = "pt"),
legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = structure(list(
fill = "white", colour = NA, size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), legend.key.size = structure(1.2, class = "unit", valid.unit = 3L, unit = "lines"),
legend.key.height = NULL, legend.key.width = NULL, legend.text = structure(list(
family = NULL, face = NULL, colour = NULL, size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), legend.text.align = NULL, legend.title = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = 0, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), legend.title.align = NULL, legend.position = "right",
legend.direction = NULL, legend.justification = "center",
legend.box = NULL, legend.box.margin = structure(c(0,
0, 0, 0), class = c("margin", "unit"), valid.unit = 1L, unit = "cm"),
legend.box.background = structure(list(), class = c("element_blank",
"element")), legend.box.spacing = structure(11, class = "unit", valid.unit = 8L, unit = "pt"),
panel.background = structure(list(fill = "white", colour = NA,
size = NULL, linetype = NULL, inherit.blank = TRUE), class = c("element_rect",
"element")), panel.border = structure(list(fill = NA,
colour = "grey20", size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), panel.spacing = structure(5.5, class = "unit", valid.unit = 8L, unit = "pt"),
panel.spacing.x = NULL, panel.spacing.y = NULL, panel.grid = structure(list(
colour = "grey92", size = NULL, linetype = NULL,
lineend = NULL, arrow = FALSE, inherit.blank = TRUE), class = c("element_line",
"element")), panel.grid.major = structure(list(), class = c("element_blank",
"element")), panel.grid.minor = structure(list(), class = c("element_blank",
"element")), panel.ontop = FALSE, plot.background = structure(list(
fill = NULL, colour = "white", size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), plot.title = structure(list(family = NULL,
face = NULL, colour = NULL, size = structure(1.2, class = "rel"),
hjust = 0, vjust = 1, angle = NULL, lineheight = NULL,
margin = structure(c(0, 0, 5.5, 0), class = c("margin",
"unit"), valid.unit = 8L, unit = "pt"), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), plot.subtitle = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = 0,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 5.5, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), plot.caption = structure(list(family = NULL,
face = NULL, colour = NULL, size = structure(0.8, class = "rel"),
hjust = 1, vjust = 1, angle = NULL, lineheight = NULL,
margin = structure(c(5.5, 0, 0, 0), class = c("margin",
"unit"), valid.unit = 8L, unit = "pt"), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), plot.tag = structure(list(family = NULL,
face = NULL, colour = NULL, size = structure(1.2, class = "rel"),
hjust = 0.5, vjust = 0.5, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), plot.tag.position = "topleft", plot.margin = structure(c(5.5,
5.5, 5.5, 5.5), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
strip.background = structure(list(fill = "grey85", colour = "grey20",
size = NULL, linetype = NULL, inherit.blank = TRUE), class = c("element_rect",
"element")), strip.placement = "inside", strip.text = structure(list(
family = NULL, face = NULL, colour = "grey10", size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = structure(c(4.4, 4.4, 4.4, 4.4), class = c("margin",
"unit"), valid.unit = 8L, unit = "pt"), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), strip.text.x = NULL, strip.text.y = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = NULL, vjust = NULL, angle = -90, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), strip.switch.pad.grid = structure(2.75, class = "unit", valid.unit = 8L, unit = "pt"),
strip.switch.pad.wrap = structure(2.75, class = "unit", valid.unit = 8L, unit = "pt")), class = c("theme",
"gg"), complete = TRUE, validate = TRUE), coordinates = <environment>,
facet = <environment>, plot_env = <environment>, labels = list(
title = "a) ROC for Tt = 10°C;RHt = 90%; \nSDt = 12 hours; and LW = rain and RH>90%.",
x = "one_min_spec", y = "sens", label = "cut_point",
intercept = "intercept", slope = "slope")), class = c("gg",
"ggplot")), structure(list(data = structure(list(model = c("88_10_10_rainrh",
"88_10_10_rainrh", "88_10_10_rainrh", "88_10_10_rainrh", "88_10_10_rainrh",
"88_10_10_rainrh", "88_10_10_rainrh", "88_10_10_rainrh", "88_10_10_rainrh",
"88_10_10_rainrh", "88_10_10_rainrh", "88_10_10_rainrh", "88_10_10_rainrh",
"88_10_10_rainrh", "88_10_10_rainrh", "88_10_10_rainrh", "88_10_10_rainrh",
"88_10_10_rainrh", "88_10_10_rainrh", "88_10_10_rainrh"), sens = c(0,
0.6, 0.6, 0.6, 0.6, 0.6, 0.7, 0.7, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8,
0.8, 0.9, 1, 1, 1, 1), one_min_spec = c(0, 0.195876288659794,
0.195876288659794, 0.195876288659794, 0.195876288659794, 0.206185567010309,
0.22680412371134, 0.22680412371134, 0.247422680412371, 0.268041237113402,
0.268041237113402, 0.306701030927835, 0.324742268041237, 0.358247422680412,
0.394329896907217, 0.430412371134021, 0.551546391752577, 0.685567010309278,
0.765463917525773, 1), cut_point = c(NA, 18L, 17L, 16L, 15L,
14L, 13L, 12L, 11L, 10L, 9L, 8L, 7L, 6L, 5L, 4L, 3L, 2L, 1L,
NA)), row.names = c(1L, 12277L, 11591L, 10905L, 10219L, 9533L,
8847L, 8161L, 7475L, 6789L, 6103L, 5417L, 4731L, 4045L, 3359L,
2673L, 1987L, 1301L, 615L, 20L), class = "data.frame"), layers = list(
<environment>, <environment>, <environment>, <environment>,
<environment>), scales = <environment>, mapping = structure(list(
x = ~one_min_spec, y = ~sens, label = ~cut_point), class = "uneval"),
theme = structure(list(line = structure(list(colour = "black",
size = 0.5, linetype = 1, lineend = "butt", arrow = FALSE,
inherit.blank = TRUE), class = c("element_line", "element"
)), rect = structure(list(fill = "white", colour = "black",
size = 0.5, linetype = 1, inherit.blank = TRUE), class = c("element_rect",
"element")), text = structure(list(family = "", face = "plain",
colour = "black", size = 14, hjust = 0.5, vjust = 0.5,
angle = 0, lineheight = 0.9, margin = structure(c(0,
0, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = FALSE, inherit.blank = FALSE), class = c("element_text",
"element")), axis.title.x = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(2.75,
0, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.title.x.top = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 2.75, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.title.y = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 1, angle = 90, lineheight = NULL, margin = structure(c(0,
2.75, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.title.y.right = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = -90, lineheight = NULL, margin = structure(c(0,
0, 0, 2.75), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text = structure(list(family = NULL, face = NULL,
colour = "grey30", size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(2.2,
0, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.x.top = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = NULL,
vjust = 0, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 2.2, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.y = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = 1, vjust = NULL,
angle = NULL, lineheight = NULL, margin = structure(c(0,
2.2, 0, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.text.y.right = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = 0, vjust = NULL,
angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 0, 2.2), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), axis.ticks = structure(list(colour = "grey20",
size = NULL, linetype = NULL, lineend = NULL, arrow = FALSE,
inherit.blank = TRUE), class = c("element_line", "element"
)), axis.ticks.length = structure(2.75, class = "unit", valid.unit = 8L, unit = "pt"),
axis.line = structure(list(), class = c("element_blank",
"element")), axis.line.x = NULL, axis.line.y = NULL,
legend.background = structure(list(fill = NULL, colour = NA,
size = NULL, linetype = NULL, inherit.blank = TRUE), class = c("element_rect",
"element")), legend.margin = structure(c(5.5, 5.5, 5.5,
5.5), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
legend.spacing = structure(11, class = "unit", valid.unit = 8L, unit = "pt"),
legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = structure(list(
fill = "white", colour = NA, size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), legend.key.size = structure(1.2, class = "unit", valid.unit = 3L, unit = "lines"),
legend.key.height = NULL, legend.key.width = NULL, legend.text = structure(list(
family = NULL, face = NULL, colour = NULL, size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), legend.text.align = NULL, legend.title = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = 0, vjust = NULL, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), legend.title.align = NULL, legend.position = "right",
legend.direction = NULL, legend.justification = "center",
legend.box = NULL, legend.box.margin = structure(c(0,
0, 0, 0), class = c("margin", "unit"), valid.unit = 1L, unit = "cm"),
legend.box.background = structure(list(), class = c("element_blank",
"element")), legend.box.spacing = structure(11, class = "unit", valid.unit = 8L, unit = "pt"),
panel.background = structure(list(fill = "white", colour = NA,
size = NULL, linetype = NULL, inherit.blank = TRUE), class = c("element_rect",
"element")), panel.border = structure(list(fill = NA,
colour = "grey20", size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), panel.spacing = structure(5.5, class = "unit", valid.unit = 8L, unit = "pt"),
panel.spacing.x = NULL, panel.spacing.y = NULL, panel.grid = structure(list(
colour = "grey92", size = NULL, linetype = NULL,
lineend = NULL, arrow = FALSE, inherit.blank = TRUE), class = c("element_line",
"element")), panel.grid.major = structure(list(), class = c("element_blank",
"element")), panel.grid.minor = structure(list(), class = c("element_blank",
"element")), panel.ontop = FALSE, plot.background = structure(list(
fill = NULL, colour = "white", size = NULL, linetype = NULL,
inherit.blank = TRUE), class = c("element_rect",
"element")), plot.title = structure(list(family = NULL,
face = NULL, colour = NULL, size = structure(1.2, class = "rel"),
hjust = 0, vjust = 1, angle = NULL, lineheight = NULL,
margin = structure(c(0, 0, 5.5, 0), class = c("margin",
"unit"), valid.unit = 8L, unit = "pt"), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), plot.subtitle = structure(list(family = NULL,
face = NULL, colour = NULL, size = NULL, hjust = 0,
vjust = 1, angle = NULL, lineheight = NULL, margin = structure(c(0,
0, 5.5, 0), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), plot.caption = structure(list(family = NULL,
face = NULL, colour = NULL, size = structure(0.8, class = "rel"),
hjust = 1, vjust = 1, angle = NULL, lineheight = NULL,
margin = structure(c(5.5, 0, 0, 0), class = c("margin",
"unit"), valid.unit = 8L, unit = "pt"), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), plot.tag = structure(list(family = NULL,
face = NULL, colour = NULL, size = structure(1.2, class = "rel"),
hjust = 0.5, vjust = 0.5, angle = NULL, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), plot.tag.position = "topleft", plot.margin = structure(c(5.5,
5.5, 5.5, 5.5), class = c("margin", "unit"), valid.unit = 8L, unit = "pt"),
strip.background = structure(list(fill = "grey85", colour = "grey20",
size = NULL, linetype = NULL, inherit.blank = TRUE), class = c("element_rect",
"element")), strip.placement = "inside", strip.text = structure(list(
family = NULL, face = NULL, colour = "grey10", size = structure(0.8, class = "rel"),
hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
margin = structure(c(4.4, 4.4, 4.4, 4.4), class = c("margin",
"unit"), valid.unit = 8L, unit = "pt"), debug = NULL,
inherit.blank = TRUE), class = c("element_text",
"element")), strip.text.x = NULL, strip.text.y = structure(list(
family = NULL, face = NULL, colour = NULL, size = NULL,
hjust = NULL, vjust = NULL, angle = -90, lineheight = NULL,
margin = NULL, debug = NULL, inherit.blank = TRUE), class = c("element_text",
"element")), strip.switch.pad.grid = structure(2.75, class = "unit", valid.unit = 8L, unit = "pt"),
strip.switch.pad.wrap = structure(2.75, class = "unit", valid.unit = 8L, unit = "pt")), class = c("theme",
"gg"), complete = TRUE, validate = TRUE), coordinates = <environment>,
facet = <environment>, plot_env = <environment>, labels = list(
title = "b) ROC for Tt = 10°C;RHt = 88%; \nSDt = 10 hours; and LW = rain and RH>90%.",
x = "one_min_spec", y = "sens", label = "cut_point",
intercept = "intercept", slope = "slope")), class = c("gg",
"ggplot")))
答案 0 :(得分:1)
我无法使用您发布的代码。使用plot_grid中的cowplot package函数是否可能解决?
您可以使用plot_grid轻松并排生成图形。例如,
plot_grid(p1,p2,nrow=1,labels='auto')
此外,您可以尝试编辑YAML标头以包括以下内容:
header-includes:
- \usepackage{float}
- \floatplacement{figure}{H}`
这将确保在文档中将图形插入到调用图形的位置。来自 bthorne ,here。