View License

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

» Watch video

Highlights from
Making Surface Plots From Scatter Data

4.8 | 55 ratings Rate this file 216 Downloads (last 30 days) File Size: 92 KB File ID: #5105 Version:
image thumbnail

Making Surface Plots From Scatter Data


Zain Mecklai (view profile)

  • 1 file
  • 4.81818


04 Jun 2004 (Updated )

How to turn a collection of XYZ triplets into a surface plot.

Editor's Notes:

This file was a File Exchange Pick of the Week

| Watch this File

File Information

How do you turn a collection of XYZ triplets into a surface plot? This is the most frequently asked 3D plotting question that I got when I was in Tech Support. This submission explains how.

MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (57)
22 Feb 2017 Toby Hill-Smith

Lifesaver, cheers. For me it really helped getting rid of the "clean it up" section at the bottom

18 Feb 2017 Hjort

Hjort (view profile)

23 Dec 2016 sumana

sumana (view profile)

It does not work for a sphere.

18 Dec 2016 changseop kwon

Awesome!!! Thanks!

Comment only
06 Dec 2016 Iddo Weiner


15 Nov 2016 Beth Wilcox


25 Oct 2016 YANLIN JIN


Comment only
29 Aug 2016 Liye SUN

Works Well!

16 Aug 2016 Kourosh Behzadian

Very helpful!

05 Aug 2016 Sarah Olson

So helpful!

13 Jun 2016 Mario Contreras

29 Apr 2016 E. Cheynet

31 Mar 2016 Ali Ghayoor

07 Mar 2016 Ramy

Ramy (view profile)

26 Feb 2016 Jang DV

Excellent !

26 Feb 2016 Yaniv Netboute

23 Feb 2016 Roman Jamy

12 Feb 2016 Asa Darnell

A+. I'm using this to visualize data from a Photogrammetry software that outputs 'random' data points instead of points on a standard grid and it works perfectly! Thanks!!!!!!!!

03 Nov 2015 Andreas

Andreas (view profile)

Great function, helped a lot for creating lookuptables.

22 Oct 2015 Amanda Childers

This is exactly what I've been looking for for years. Worked great.

30 Sep 2015 Mahdi

Mahdi (view profile)

11 Nov 2014 Rick van Rijn

09 Nov 2014 DHRUPAL SHAH

11 Sep 2014 saravana

very helpful thanks a lot

09 Aug 2014 Highman Field

But this doesn't work when a surface is curved like a ball. You triangulate these projections of the vertices on x-y plane, but some obtained triangles are not the projections of the real triangles on the surface.

22 Apr 2014 Nick

Nick (view profile)

17 Oct 2013 Matt

Matt (view profile)

just what i needed!!!!

31 May 2013 Mohan Prasath Thirumalaisamy

12 Mar 2013 Seyed Valashani

thanks, solved my problem as well

23 Jan 2013 Manel Soria

Thanks !

11 Jan 2013 Matlab2010

Excellent. Well done!

18 Sep 2012 IIT Bombay

extremely useful

08 Jun 2012 Wenwu

Wenwu (view profile)

29 May 2012 Saurabh Singh

Awesome!! Can anybody tell if I can draw contour plot on the same?

15 Dec 2011 Nunthadech Rodcheuy


15 Sep 2008 C. Maguire

Using "delaunay" is what "griddata" does. It's only okay for 2D data, but very slow for 3D data (z will be an individual dimension, instead of a value of f(x,y) in 3D data situation). Because of this reason, "griddata3" is good but too slow.

26 Jun 2008 Carlos Adrian Vargas Aguilera

This is nice Zain. Why don't you made a function? Ignoring NaNs also.

22 Apr 2008 Thomas Jansson

Just what I was looking for - this should have a seperate function in Matlab or at least be listed in the help files. :)

15 Jan 2008 Laura .

Works great!

01 Dec 2007 Johnny Green

Thanks so much!

02 Oct 2007 Catherine St-P

Thank you!!! It saved me sooo much time! Wow...

18 Jun 2007 jack zuo

good stuff!

28 Apr 2007 Jen Badham

Just what I needed

30 Mar 2007 Xiaolan Wang

Genius idea. Easy and works just perfectly. Thank you very much.

25 Feb 2007 Blake Fleischer

Being new to this program, the tutorial was essential for me. Only problem I had was typing the right commands. Many Thanks!

05 Aug 2006 Oya Mercan


13 Jun 2006 NT NT

22 Apr 2006 Nimal L

02 Feb 2006 R P

quite good!

09 Jan 2006 Chris Lim

Any idea on how to make a contour plot with scatter data?

16 Oct 2005 sheela kumar

cool !

10 Oct 2005 Chammika Udalagama

03 Mar 2005 Goncalo Gil

Sweet!!! That did it!

remove [NOSPAM!!!] from email if you would like to contact me.

22 Feb 2005 Eric Benson

Solved my problem!

26 Oct 2004 Robert Riley

03 Oct 2004 Lorenzo Natale

01 Oct 2004 Stefan Burger

01 Sep 2016

Updated license

Contact us