6161# ' each element a color for the type design, prop and seq respectivly.
6262# ' Default is red for the initial design, blue for allready proposed points
6363# ' and green for the actual iteration.
64+ # ' @param gg.objects [\code{list)}]
65+ # ' List of \code{gg} objects that should be added to all ggplots.
6466# ' @param ... [any]\cr
6567# ' Currently not used.
6668# ' @return Nothing.
@@ -69,7 +71,7 @@ plotExampleRun = function(object, iters, pause = TRUE,
6971 densregion = TRUE , se.factor = 1 , single.prop.point.plots = FALSE ,
7072 xlim = NULL , ylim = NULL ,
7173 point.size = 3 , line.size = 1 ,
72- trafo = NULL , colors = c(" red" , " blue" , " green" ), ... ) {
74+ trafo = NULL , colors = c(" red" , " blue" , " green" ), gg.objects = list (), ... ) {
7375
7476 iters.max = object $ control $ iters
7577 if (missing(iters )) {
@@ -92,6 +94,7 @@ plotExampleRun = function(object, iters, pause = TRUE,
9294 # Helper to arrange plot via gridExtra and pause process
9395 arrangePlots = function (plots , multi.crit ) {
9496 plots = Filter(Negate(isScalarNA ), plots )
97+ plots = lapply(plots , addGgsToGgplot , gg.objects )
9598 n.plots = length(plots )
9699 if (n.plots > 1 ) {
97100 requirePackages(" gridExtra" , why = " plotExampleRun" )
@@ -113,7 +116,7 @@ plotExampleRun = function(object, iters, pause = TRUE,
113116 # get rendered plot data
114117 plots = renderExampleRunPlot(object , iter = iter , densregion = densregion , se.factor = se.factor ,
115118 single.prop.point.plots = single.prop.point.plots , xlim = xlim , ylim = ylim ,
116- point.size = point.size , line.size = line.size , trafo = trafo , colors = colors , ... )
119+ point.size = point.size , line.size = line.size , trafo = trafo , colors = colors , gg.objects = gg.objects , ... )
117120 if (! any(vlapply(plots , inherits , what = " ggplot" ))) {
118121 # in this case we have multicrit multipoint proposal: list of plots for each proposed point
119122 for (jter in 1 : length(plots )) {
0 commit comments