Sounds probably more complicated than what I want to achieve :) Since I do a lot of formatting to my plots I want to wrap this all in a function. However some formatting and setting of parameters is done before the plotn call and adding the legend and icon as well as formatting them is done after the plot call. So I basically want a function like:
myFormattedPlots<-function(plotFunctionName, plotFunctionParameters...)
The parameters list depends of course on the function..but I image something like this:
myFormattedPlots<-function("plot.xts",MyXTSTimeSeries){
par(xpd=FALSE)
...
plot.xts(MyXTSTimeSeries)
grid.raster(logo,x=c(0.05),y=c(0.02),width=0.05,height=0.03)
}
How can I achieve that?
...anddo.callas those could be quite useful for your purpose.