> With regard to speeds, could you say what OS and R version 
> you are using, 
> because the different devices behave differently on different 
> systems (in 
> particular the Windows segment drawing function seems to have 
> been impared 
> by a recent patch I think to XP). Otherwise, the work you are 
> showing on 
> Rpad is quite remarkable, far beyond anything I'd anticipated! 

Here are some timings of plots of GIS line data with 44000 lines and 99000
total segments. These are in R 2.0.1 on Win2000 to the x11() device on an
oldish Dell laptop:

# plot using the sldf data structure from the sp package:
> system.time(plot(sldf), gcFirst = TRUE)
[1] 240.42  10.50 259.42     NA     NA

# plot using the segments data structure:
> system.time({plot.new()
+              plot.window(xlim=range(seg$x1, seg$x2),
+                          ylim=range(seg$y1, seg$y2),
+                          asp=1)
+              segments(seg$x1, seg$y1, seg$x2, seg$y2)
+             }, gcFirst = TRUE)
[1] 1.11 5.32 7.97   NA   NA

Here are the same timings on the much faster www.rpad.org computer running R
2.1.0 (Debian Linux) with the png device.

> system.time(plot(sldf), gcFirst = TRUE)
[1] 36.05  0.53 37.99  0.00  0.00

> system.time({plot.new()
+              plot.window(xlim=range(seg$x1, seg$x2),
+                          ylim=range(seg$y1, seg$y2),
+                          asp=1)
+              segments(seg$x1, seg$y1, seg$x2, seg$y2)
+             },gcFirst = TRUE)
[1] 0.14 0.01 0.19 0.00 0.00

This example is extreme, since this data has few segments per line entry, so
the sldf plotting has a lot of entries to loop through.

- Tom

Tom Short
EPRI Solutions, Inc.

	[[alternative HTML version deleted]]


