Skip to content
Back to formatted view

Raw Message

Message-ID: <XFMail.041125003715.Ted.Harding@nessie.mcc.ac.uk>
Date: 2004-11-25T00:37:15Z
From: (Ted Harding)
Subject: scatterplot of 100000 points and pdf file format
In-Reply-To: <Pine.LNX.4.61.0411241646080.2681@gannet.stats>

On 24-Nov-04 Prof Brian Ripley wrote:
> On Wed, 24 Nov 2004 Ted.Harding at nessie.mcc.ac.uk wrote:
> 
>> 1. Multiply the data by some factor and then round the
>>   results to an integer (to avoid problems in step 2).
>>   Factor chosen so that the result of (4) below is
>>   satisfactory.
>>
>> 2. Eliminate duplicates in the result of (1).
>>
>> 3. Divide by the factor you used in (1).
>>
>> 4. Plot the result; save plot to PDF.
>>
>> As to how to do it in R: the critical step is (2),
>> which with so many points could be very heavy unless
>> done by a well-chosen procedure. I'm not expert enough
>> to advise about that, but no doubt others are.
> 
> unique will eat that for breakfast
> 
>> x <- runif(1e6)
>> system.time(xx <- unique(round(x, 4)))
> [1] 0.55 0.09 0.64 0.00 0.00
>> length(xx)
> [1] 10001

'unique' will eat x for breakfast, indeed, but will have some
trouble chewing (x,y).

I still can't think of a neat way of doing that.

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861  [NB: New number!]
Date: 25-Nov-04                                       Time: 00:37:15
------------------------------ XFMail ------------------------------