On 04.01.2008, at 23:49, Charilaos Skiadas wrote:
I think that's a great idea!
Only thing I would suggest, is that the images show up in the Rmate output window scaled to a predetermined, much smaller, height, so that they show up as thumbnails. Would that be easy to do?
It's very easy – only pre-set the HTML width parameter in tmR.rb, but one cannot change the size on-the-fly using JavaScript I believe.
How does this treat lattice plots?
I took an example from the xyplot help file and set the plot images' width to 200:
library(lattice) require(stats) Depth <- equal.count(quakes$depth, number=8, overlap=.1) xyplot(lat ~ long | Depth, data = quakes) update(trellis.last.object(), strip = strip.custom(strip.names = TRUE, strip.levels = TRUE), par.strip.text = list(cex = 0.75), aspect = "iso") EE <- equal.count(ethanol$E, number=9, overlap=1/4) ## Constructing panel functions on the fly; prepanel xyplot(NOx ~ C | EE, data = ethanol, prepanel = function(x, y) prepanel.loess(x, y, span = 1), xlab = "Compression Ratio", ylab = "NOx (micrograms/J)", panel = function(x, y) { panel.grid(h=-1, v= 2) panel.xyplot(x, y) panel.loess(x,y, span=1) }, aspect = "xy") ## with and without banking plot <- xyplot(sunspot.year ~ 1700:1988, xlab = "", type = "l", scales = list(x = list(alternating = 2)), main = "Yearly Sunspots") print(plot, position = c(0, .3, 1, .9), more = TRUE) print(update(plot, aspect = "xy", main = "", xlab = "Year"), position = c(0, 0, 1, .3))
and I got this ;)