I have this R code, which works perfectly and i get the bitmap with the plot if i run it in R console or as a RScript
library(DBI);
library(RMySQL);
library(brew);
library(lattice);
con <- dbConnect(MySQL(),server credentials)
x <- dbGetQuery(con,"SELECT name, distance FROM distances")
bitmap("/tmp/dist_6078.bmp")
dotplot(x$distance~x$name, col='red', xlab='name', ylab='distance', main='Distance plot')
dev.off()
Issue is, i am getting a blank image if i enclose everything between <% and %> and use brew library. Everything works fine if i use basic R plots, issue is only when i use lattice.