Это временный ответ для вас, если вы сказали, что хотите увидеть, что я на самом деле создаю график c. Сравните это с вашим собственным кодом. Я рад удалить этот ответ, как только вы закончите sh сравнение.
df <- data.frame(gname = c("Islamic State of Iraq and the Levant (ISIL)",
"Islamic State of Iraq and the Levant (ISIL)",
"Islamic State of Iraq and the Levant (ISIL)",
"Taliban",
"Islamic State of Iraq and the Levant (ISIL)",
"Taliban",
"Taliban",
"Taliban",
"Al-Shabaab",
"Taliban",
"Taliban",
"Al-Shabaab",
"Al-Shabaab",
"Boko Haram",
"Shining Path (SL)",
"Communist Party of India - Maoist (CPI-Maoist)",
"Shining Path (SL)",
"Boko Haram",
"Shining Path (SL)",
"Farabundo Marti National Liberation Front (FMLN)"),
iyear = c(2016, 2017, 2014, 2015, 2015, 2016, 2014,
2017, 2014, 2012, 2013, 2017, 2016, 2015, 1989, 2010,
1984, 2014, 1983, 1991),
total = c(1454, 1315, 1249, 1249, 1221, 1065,
1035, 894, 871, 800, 775, 570,
564, 540, 509, 505, 502, 495,
493, 492),
stringsAsFactors = F)
streamgraph(data = df ,key = "gname", date = "iyear", value = "total") %>%
sg_annotate(label = "ISIL", x = as.Date("2016-01-01"), y = 1454, size = 14)