[R] bwlpot problems: printing, and tick labels
Dimitri Shvorob
dimitri.shvorob at gmail.com
Wed Apr 27 17:34:47 CEST 2011
Two problems with the code below.
A. It produces empty JPEGs. When the 'bwplot' line alone is submitted, the
plot duly shows up.
B. 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.
More information about the R-help
mailing list