Tom, The sub argument will always put text at the bottom -- this is all plotting in R not just image.plot If you want two lines in the title just build in a new line:
z<- outer( 1:15, 1:10,"+") image.plot( z, main="the title \n the subtitle") Best, Doug ----------------------------------------------------------------------------- Doug Nychka, Institute for Mathematics Applied to Geosciences National Center for Atmospheric Research Boulder, CO Email: nychka "AT" ucar "DOT" edu Web: www.image.ucar.edu/~nychka Voice: 303-497-1711 FAX: 303-497-1298 Business Cell: 303-725-3199 On May 1, 2012, at 10:25 AM, Tom Roche wrote: > > summary: how to make image.plot print a subtitle between the title and > the image, rather than under the image? > > details: > > I've got a project > > https://github.com/TomRoche/ioapi-hack-R > > that illustrates the use of (et al) the R packages {ncdf4, fields, M3} > for processing and visualizing IOAPI data. The data being visualized > consists of a series of layers (mostly representing emissions from a > particular tuple of agricultural {cultivar, cultivation technique}) > over a surface (in the upper midwest US). I'm currently plotting > > https://github.com/downloads/TomRoche/ioapi-hack-R/compare.DN2.layers.pdf > > each layer, and including some information about the layer in a title > and subtitle. The title is where I want it--above the image--but the > subtitle is printing below the image; I'd prefer it between the title > and the image. Can this be done? FWIW, the code that plots (in > > https://github.com/TomRoche/ioapi-hack-R/blob/master/plotLayersForTimestep.r > > ) is like > > if (data to plot is not all NA) { > # determine quantiles, then > image.plot(plot.list, xlab="", ylab="", axes=F, col=colors(100), > axis.args=list(at=quantiles, labels=quantiles.formatted), > main=title, sub=subtitle) > lines(map) > } else { > plot(0, type="n", axes=F, xlab="", ylab="", > xlim=range(x.centers), ylim=range(y.centers), > main=title, sub=subtitle) > lines(map) > } # end testing data > > TIA, Tom Roche <tom_ro...@pobox.com> [[alternative HTML version deleted]] ______________________________________________ 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.