There are 2 dataset
Forecast=structure(list(sub = c("01.01.01 Automatic switches ARMAT", "01.01.01 Automatic switches ARMAT",
"01.01.01 Automatic switches ARMAT", "01.01.02 Automatic switches KARAT",
"01.01.02 Automatic switches KARAT", "01.01.02 Automatic switches KARAT"
), ds = c("01.05.2022", "01.06.2022", "01.07.2022", "01.05.2022",
"01.06.2022", "01.07.2022"), forecast = c(30696L, 30696L, 30696L,
1089910L, 1089910L, 1089910L), fct = c(22590L, 29243L, 30521L,
803535L, 1430316L, 1312260L)), class = "data.frame", row.names = c(NA,
-6L))
sub is grouping variable. forecast column is forecast on month(ds column).Fact is real data.
Each forecast performed by group separately(sub column)
Also second dataset
manager_forecast=structure(list(sud = c("01.01.01 Automatic switches ARMAT", "01.01.01 Automatic switches ARMAT",
"01.01.02 Automatic switches KARAT", "01.01.02 Automatic switches KARAT",
"", ""), ds = c("01.06.2022", "01.07.2022", "01.06.2022", "01.07.2022",
"", ""), manager_forecast = c(76011.04671, 113534.0746, 1802431.458,
1399089.059, NA, NA)), class = "data.frame", row.names = c(NA,
-6L))
In this dataset same structure ,but here there is column manager_forecast this is how much pieces the manager thought would be sold.
Thus, for each group (sub) I need to draw a graph of correlations between how many pieces I predicted will be sold and how many were in fact (dataset forecast) and how much the manager assumed (manager_forecast)
I would like to get something like this graph for each sub (I did this in excel)

What is the easiest way for each sub to get such graphics and save them to the C: / 1 / plots folder.
thanks for your help
