Re: [R] MacOS X Quartz Rendering? (Solved)

2006-03-24 Thread Neil Gunther
The problem has been solved and thankfully, it has nothing to do with Quartz 
and 
almost nothing to do with R. Before explaining briefly, I want to thank Kevin 
Middleton, Don MacQueen, and Jim Holtman for offering their help. This kind of 
support makes using tools like R even better (especially for newbies like me).

It turns out that the problem had to do with the format of the data being used 
to generate the plots. Although I didn't mention it in my question, the data 
was 
being read in from a formatted file (produced by someone other than me). One of 
the things I found impressive about R was the ease with which it read in the 
file. That reaction was based, in part, on being a Mathematica user and having 
struggled more to get it to read the same file on an earlier occasion. That may 
not have been such a bad thing after all.

Don MacQueen was the one who asked the right questions that led to me reveal 
the 
file format as:
Date Value
00-03-27 129622
00-03-28 129285
00-03-29 141328
00-03-30 130223
.

He immediately recognized that the "Date" column was going to cause trouble 
unless R was given more explicit instructions about how to treat it viz., as a 
string!

In lieu of that (and this is the not so good part), R decides to be "helpful" 
and treat that column as integers. Probably (I haven't done the detailed 
analysis) that led to each triple of integers being computed as a pair (the 00- 
being treated as a zero) which led to each "dot" in the plot being displayed as 
a pair of dots, with further confusion apparently causing R to render the 
"dots" 
as  something more complex (e.g., "knots"). You get the idea.

Whether to interpret certain values as numbers or strings is an old I/O gotcha.
What had me fooled was that the plot *looked* correct, when compared to the 
Mathematica plot, but it was taking far too much time to render on PPC Quartz!

--njg

Neil Gunther wrote:
> I just tried rendering a plot of 166 data point (time series) on my PPC 
> mac,
> and compared it with the same data rendered by Mathematica. The R 
> plotting is very slow to paint and repaint, compared to Mathematica. 
> This also makes it extremely awkward to use in other documentation such 
> as pdfLatex.
> 
> On closer inspection, it looks like the Mathematica plot is just a 
> polyline, while in R it is a B-spline with each marker consisting of 24 
> B-splines knotted together. Moreover, the spline joints are rounded, 
> which requires computing two circles and intersecting them 26 times at 
> each bend.
> 
> Is there some reason why the point-markers are not just drawn as circles 
> or squares, instead of doing these complicated and time-consuming knots?
> 
> -- njg
> 
> 
> PERFORMANCE DYNAMICS COMPANY   http://www.perfdynamics.com/
> 

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] MacOS X Quartz Rendering?

2006-03-24 Thread Don MacQueen
Hi, Neil,

Here is some time series data (8 series, each of length 200) that 
plots very quickly in R (2.2.1) for MacOSX.
Both on a G4 powerbook using the Quartz() graphics driver and on a G5 
using the x11() graphics driver.

 z <- ts(matrix(rt(200 * 8, df = 3), 200, 8), start=c(1961, 1), 
frequency=12)
 plot(z, yax.flip = TRUE)

It's one of the examples provided in ?plot.ts


I think you will have to provide more information...at a minimum, 
say, your R version, what plot command you used, and the class of 
your time series object. (check the faq on posting)

>  sessionInfo()
R version 2.2.1, 2005-12-26, powerpc-apple-darwin7.9.0

attached base packages:
[1] "methods"   "stats" "graphics"  "grDevices" "utils" 
"datasets"  "base"

other attached packages:
rmacq
"1.0"


At 11:01 AM -0800 3/24/06, Neil Gunther wrote:
>I just tried rendering a plot of 166 data point (time series) on my PPC mac,
>and compared it with the same data rendered by Mathematica. The R plotting is
>very slow to paint and repaint, compared to Mathematica. This also makes it
>extremely awkward to use in other documentation such as pdfLatex.
>
>On closer inspection, it looks like the Mathematica plot is just a polyline,
>while in R it is a B-spline with each marker consisting of 24 
>B-splines knotted
>together. Moreover, the spline joints are rounded, which requires 
>computing two
>circles and intersecting them 26 times at each bend.
>
>Is there some reason why the point-markers are not just drawn as circles or
>squares, instead of doing these complicated and time-consuming knots?
>
>-- njg
>
>
>PERFORMANCE DYNAMICS COMPANY   http://www.perfdynamics.com/
>
>__
>[email protected] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


-- 
--
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] MacOS X Quartz Rendering?

2006-03-24 Thread Neil Gunther
I just tried rendering a plot of 166 data point (time series) on my PPC mac,
and compared it with the same data rendered by Mathematica. The R plotting is 
very slow to paint and repaint, compared to Mathematica. This also makes it 
extremely awkward to use in other documentation such as pdfLatex.

On closer inspection, it looks like the Mathematica plot is just a polyline, 
while in R it is a B-spline with each marker consisting of 24 B-splines knotted 
together. Moreover, the spline joints are rounded, which requires computing two 
circles and intersecting them 26 times at each bend.

Is there some reason why the point-markers are not just drawn as circles or 
squares, instead of doing these complicated and time-consuming knots?

-- njg


PERFORMANCE DYNAMICS COMPANY   http://www.perfdynamics.com/

__
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html