Code covered by the BSD License  

Highlights from
Making Surface Plots From Scatter Data

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

Making Surface Plots From Scatter Data


Zain Mecklai (view profile)

  • 1 file
  • 4.80556


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 (36)
11 Nov 2014 Rick van Rijn  
09 Nov 2014 DHRUPAL SHAH  
11 Sep 2014 saravana

very helpful thanks a lot

09 Aug 2014 Felon Highman

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 none

none (view profile)

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  

Contact us