Rank: 444 based on 268 downloads (last 30 days) and 2 files submitted
photo

Ken Garrard

E-mail
Company/University
North Carolina State University
Lat/Long
35.80712, -78.74412

Personal Profile:

 

Watch this Author's files

 

Files Posted by Ken Garrard View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
19 Aug 2013 Screenshot Color coded 3D scatterplot Produces a 3D scatterplot of XYZ data with varying colors Author: Ken Garrard specialized, plotting, scatterplot, 3d, plot3, plot3c 126 40
  • 4.86842
4.9 | 41 ratings
12 Oct 2011 Screenshot 3D Polar Plot Plots 3d polar data with polar axis and polar grid Author: Ken Garrard specialized, plotting, polar, plot, 3d, graphics 142 23
  • 4.86667
4.9 | 15 ratings
Comments and Ratings by Ken Garrard View all
Updated File Comments Rating
30 Oct 2014 3D Polar Plot Plots 3d polar data with polar axis and polar grid Author: Ken Garrard

Kelly,
You could try using the return matrices Xi,Yi,Zi to make an interpolating function. Then find z values corresponding to any x,y points you want.

An example, using scatteredInterpolant,

[t,r] = meshgrid(linspace(0,2*pi,361), ...
linspace(-4,4,101));
[x,y] = pol2cart(t,r);
P = peaks(x,y);
angR = [20 350]*pi/180;
radR = [.8 4];
figure;
[xi,yi,zi] = ...
polarplot3d(P, ...
'AngularRange',angR, ...
'RadialRange',radR);
zFun = ...
scatteredInterpolant(xi(:),yi(:),zi(:), ...
'natural');
figure;
surf(x,y,zFun(x,y),'linestyle','none');

22 May 2014 3D Polar Plot Plots 3d polar data with polar axis and polar grid Author: Ken Garrard

Seb,
I believe this is due to an opengl bug. For example,
figure('renderer','opengl');
polarplot3d(peaks(101),'cartorigin',[10^6 10^8]);
is mangled. But,
figure('renderer','zbuffer');
polarplot3d(peaks(101),'cartorigin',[10^6 10^8]);
looks good. Painters works too but the gridlines aren't drawn very well.

17 Aug 2013 Color coded 3D scatterplot Produces a 3D scatterplot of XYZ data with varying colors Author: Ken Garrard

Carlyle, Points with a NaN color value can be excluded by setting the Z value for those points to NaN. For (x,y,z) data with color vector c, 'z(isnan(c))=NaN'. An updated plot3k has been submitted.

31 Jul 2013 Color coded 3D scatterplot Produces a 3D scatterplot of XYZ data with varying colors Author: Ken Garrard

Jackson, Use either 'hold on' or 'axes(h)' before calling plot3k to plot into the current axes or the axes with handle 'h'.

08 Mar 2012 Color coded 3D scatterplot Produces a 3D scatterplot of XYZ data with varying colors Author: Ken Garrard

Thanks for the suggestion Val. I'll update the submission.

Comments and Ratings on Ken Garrard's Files View all
Updated File Comment by Comments Rating
30 Oct 2014 3D Polar Plot Plots 3d polar data with polar axis and polar grid Author: Ken Garrard Ken Garrard

Kelly,
You could try using the return matrices Xi,Yi,Zi to make an interpolating function. Then find z values corresponding to any x,y points you want.

An example, using scatteredInterpolant,

[t,r] = meshgrid(linspace(0,2*pi,361), ...
linspace(-4,4,101));
[x,y] = pol2cart(t,r);
P = peaks(x,y);
angR = [20 350]*pi/180;
radR = [.8 4];
figure;
[xi,yi,zi] = ...
polarplot3d(P, ...
'AngularRange',angR, ...
'RadialRange',radR);
zFun = ...
scatteredInterpolant(xi(:),yi(:),zi(:), ...
'natural');
figure;
surf(x,y,zFun(x,y),'linestyle','none');

28 Oct 2014 3D Polar Plot Plots 3d polar data with polar axis and polar grid Author: Ken Garrard kelly

Excellent script; thank you very much for it.

I would like to interpolate across the center of the plot(constituted by the first row or the input vector), as well as between the first and last column of the input vector.

Could you advise me on how to proceed with this?

28 Aug 2014 Color coded 3D scatterplot Produces a 3D scatterplot of XYZ data with varying colors Author: Ken Garrard samfort

20 Aug 2014 Color coded 3D scatterplot Produces a 3D scatterplot of XYZ data with varying colors Author: Ken Garrard Emre Kopanoglu

22 May 2014 3D Polar Plot Plots 3d polar data with polar axis and polar grid Author: Ken Garrard Ken Garrard

Seb,
I believe this is due to an opengl bug. For example,
figure('renderer','opengl');
polarplot3d(peaks(101),'cartorigin',[10^6 10^8]);
is mangled. But,
figure('renderer','zbuffer');
polarplot3d(peaks(101),'cartorigin',[10^6 10^8]);
looks good. Painters works too but the gridlines aren't drawn very well.

Contact us