I am trying to plot two regression summaries side-by-side with one centered title. Each regression summary is generated by plot.rqs()
and amounts to a set of 9
First we generate an example object, fm
. Then we copy plot.rqs
and use trace
on the copy to insert par <- list
at top effectively nullifying any use of par
within the function. Then we do the same with plot.summary.rqs
. Finally we test it out with our own par
:
library(quantreg)
example(plot.rqs) # fm to use in example
# plot.rqs
plot.rqs <- quantreg::plot.rqs
trace("plot.rqs", quote(par <- list), print = FALSE)
# plot.summary.rqs
plot.summary.rqs <- quantreg::plot.summary.rqs
trace("plot.summary.rqs", quote(par <- list), print = FALSE)
# test it out
op <- par(mfrow = c(2, 2))
plot(summary(fm))
plot(fm)
title("My Plots", outer = TRUE, line = -1)
par(op)
EDIT: added plot.summary.rqs
.