Using layout I've created a function that makes a 2 panel plot - comprising a main plot, and a sub-panel with custom legend.
I would now like to use layout to create multiple panels with plots created by my function, however the values for layout set in the function act globally, stopping me from setting this up how I want. So if I say: layout(matrix(1:2, 1,2)) my.plot(data) I end up with a single plot according the layout format specified by the function, rather than a plot generated by the function in the left hand panel of the matrix that should be specified by the first layout command. Is there a way to use layout in a subsetable, hierarchical way? Thanks, Simon -- View this message in context: http://r.789695.n4.nabble.com/setting-layout-locally-within-functions-tp3617257p3617257.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.