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: David Bateman
Subject: Re: fast scatter plots - advice sought
Date: Sat, 16 Jan 2010 12:41:42 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

David Bateman 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.

The cdata is used if MarkerFaceColor or MarkerEdgeColor are "flat". So yes you should be able to group all of the patches together if CData is given

Thinking about it further that won't work for the gnuplot backend as it is written as the line objects aren't pm3d objects. The cdata coloring is faked with a separate line color for each value of cdata. I'm not sure its even possible to do everything we want if pm3d for lines either..

You could group the patches into a set of patches closest to the nearest colormap value, taking into account whether the mapping is direct or indirect, but that should be done in the backend, as the colormap might change between the time the set of patches are created and they are drawn..

I'm in this part of the code at the moment, so I'll take a look and see if I can do something to make this faster by having scatter create a single "flat" patch and then separate the patches at the time they are drawn.

D.


reply via email to

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