[R] bwlpot problems: printing, and tick labels

From: Dimitri Shvorob <dimitri.shvorob_at_gmail.com>
Date: Wed, 27 Apr 2011 08:34:47 -0700 (PDT)


Two problems with the code below.

  1. It produces empty JPEGs. When the 'bwplot' line alone is submitted, the plot duly shows up.
  2. When the 'bwplot' line alone is submitted, y labels are values 1 to 6, not actual distinct values of y$maxthreads. (C. I would, of course, prefer to produce plots for all distinct values of x$maxthreads in a single swoop, on a single figure).

Can anyone help?

Thank you.

library(lattice)
options(stringsAsFactors = F)

x = structure(list(mode = c("serial", "parallel", "parallel", "parallel",
"serial", "parallel", "parallel", "parallel", "parallel", "serial",
"parallel", "parallel", "parallel", "parallel", "parallel", "serial",
"parallel", "parallel", "parallel", "serial", "parallel", "parallel",
"parallel", "parallel", "serial", "parallel", "parallel", "parallel",
"parallel", "parallel"), tasks = c(4L, 4L, 4L, 4L, 8L, 8L, 8L,

8L, 8L, 16L, 16L, 16L, 16L, 16L, 16L, 4L, 4L, 4L, 4L, 8L, 8L, 
8L, 8L, 8L, 16L, 16L, 16L, 16L, 16L, 16L), maxthreads = c(0L, 
1L, 2L, 4L, 0L, 1L, 2L, 4L, 8L, 0L, 1L, 2L, 4L, 8L, 16L, 0L, 
1L, 2L, 4L, 0L, 1L, 2L, 4L, 8L, 0L, 1L, 2L, 4L, 8L, 16L), rep = c(1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), task = c(0L, 
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), time = c(1828L, 
1781L, 1656L, 2171L, 3281L, 3984L, 3468L, 2921L, 4015L, 7218L, 
7828L, 8093L, 6750L, 7515L, 8703L, 1734L, 2218L, 2343L, 2171L, 
3468L, 5281L, 3843L, 3687L, 3734L, 7156L, 8890L, 8937L, 7343L, 7921L, 9203L), result = c(NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA), success = c("True", "True", "True", "True", 

"True", "True", "True", "True", "True", "True", "True", "True",
"True", "True", "True", "True", "True", "True", "True", "True",
"True", "True", "True", "True", "True", "True", "True", "True",
"True", "True")), .Names = c("mode", "tasks", "maxthreads", "rep",
"task", "time", "result", "success"), class = "data.frame", row.names =
c(NA,
-30L))

tt = unique(x$tasks)

for(i in 1:length(tt))
{
  y = subset(x, tasks = tt[i], select = c(maxthreads, rep, time))   file = ...
  jpeg(file, height = 600, width = 1200)   bwplot(maxthreads ~ time,

       data = y,
       ylab = "maxthreads", 
       xlab = "time, ms")

  dev.off()
}
--
View this message in context: http://r.789695.n4.nabble.com/bwlpot-problems-printing-and-tick-labels-tp3478504p3478504.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_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.
Received on Wed 27 Apr 2011 - 18:06:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Apr 2011 - 11:20:38 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive