octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fast scatter plots - advice sought


From: Jaroslav Hajek
Subject: Re: fast scatter plots - advice sought
Date: Wed, 3 Feb 2010 07:38:09 +0100

On Mon, Feb 1, 2010 at 5:10 PM, David Bateman <address@hidden> wrote:
> Jaroslav Hajek wrote:
>>
>> On Fri, Jan 15, 2010 at 3:06 PM, dbateman <address@hidden> wrote:
>>
>>>
>>> Ok, so given this and the feedback from Shai both scatter and the gnuplot
>>> backend do the wrong thing here. I'll fix this over the weekend.
>>>
>>> Thanks
>>> David
>>>
>>>
>>
>> I didn't quite follow the information flow, but I noted that if in
>> Matlab you do scatter (x, y, s, c) where x, y, c are long column
>> vectors and s is a scalar, Matlab creates a single patch that can
>> handle the varying color, through property VertexCData or something
>> like that. Is this possible for Octave? If so, then in this case one
>> would not need to split by unique colors and sizes, but just by sizes,
>> which would probably be much faster when variable colors are used.
>>
>> OTOH, when colors are specified as a full RGB Nx3 array, Matlab (2007)
>> seems to invariably make one patch per point.
>>
>>
>
> Jaroslav,
>
> It appears that gnuplot can handle a PM3D palette for lines in 2 and 3D, so
> can be quite easily handled in gnuplot itself. Something like the attached
> patch seems to work and the example
>
> n=5000;x = randn(1,n); y = randn(1,n); c = sqrt(x.^2+y.^2); h =
> scatter(x,y,6,c)
>
> is now quite fast with gnuplot. Do you see any issues with making a change
> like this?
>
> D.
>

I don't see any problems. Thanks for implementing this.

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]