File Exchange

image thumbnail

fscatter3.m

version 1.1 (1.78 KB) by

Makes 3d scatter plot much faster than scatter3.

4.71429
15 Ratings

9 Downloads

Updated

View License

Uses a loop in order to plot colour classes as line objects (plot3) for colouring 3d points.Much faster than scatter3, does not need as much memory.Very useful with large point clouds.

Comments and Ratings (16)

hello,
i tried to use function fscatter3 but i have some errores in colormap(cmap) i don't why it's not working
Any body have exemble how can use function fscatter3
Thanks !

Tan Trinh

Awesome code. Thank you!!!

I replaced:
ii = round(interp1([floor(mins) ceil(maxs)],[1 numclass],C));
with
ii=floor(numclass*(Z-minz)/(maxz-minz));
to make the colormap vary wrt Z axis.
That was what I needed anyway...
Thanks for the code.
SG

Me Cas

Been of great help. Excellent.

Tom Geukens

Now we're talking! I was just about to toss Matlab out because of it's horrible graphing for REAL 3D data, but this is just perfect. Great Job!

Emmanuel FARHI

Excellent and fast

root server

Works much faster than griddata + surf

Douglas Lanman

Tom D

I changed the last part so that zeros for Z values will be interpreted as a 2D scatter:

if ~minz & ~maxz
    axis([minx maxx miny maxy])
else
    axis([minx maxx miny maxy minz maxz])
    axis image
end
 

B. Schönwälder

Works nice, though I had to
drop the "axis image" statement on the last line -
otherwise all three axes are locked to
equal scaling, and that might not be what you are looking for in general. The code is basic, but easy to adapt - surprising speed!

Mathias Laurin

saves time, but the FLOOR and CEIL functions line 40 prevent from using the full color scale; I'd recommand dropping them:
ii = round(interp1([mins maxs],[1 ...
     numclass],C));

Mads Hvid Ribergaard

Extremely useful.

Previous I had memory problems when using scatter on huge datasets. But now it is no longer a problem!!!

I had rewritten it to 2D (scatter), by obmitting "Z" in the code and replaced plot3 with plot.

I B

VERY USEFULL when you are working with huge amount of data sets!

Updates

1.1

Works with latest matlab, code speeded up a bit, new additional structure input option for laser data (raw.x-z and raw.int), default colorbar is now plotted.

changed default colormap to hsv ;-)

MATLAB Release
MATLAB 7.10 (R2010a)
Acknowledgements

Inspired: adinutzyc21/BundlerToMatlab

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video