3D plor plot

16 ビュー (過去 30 日間)
Mario
Mario 2016 年 4 月 20 日
回答済み: Mike Garrity 2016 年 4 月 20 日
Is there a way to plot data in a cylindrical scatter plot? I have a (70000x3) matrix of angles, radius and a third variable that I would like to plot in the same graph.
Much like the polar plot plus an additional z-direction. I have seen "3D Polar Plot" etc, but they only provide mesh or contour plots and I would like to plot the individual points. Basically a scatter3 but in cylinder coordinates.

採用された回答

Mike Garrity
Mike Garrity 2016 年 4 月 20 日
The pol2cart function will convert this to 3D Cartesian, so it's easy to get the scatter plot:
npts = 70000;
th = 2*pi*rand(npts,1);
r = 5+rand(npts,1)/3;
v = randn(npts,1);
[x,y,z] = pol2cart(th,r,v);
c = v;
scatter3(x,y,z,8,c,'.')
axis equal
view(-65,42)
You don't get a polar grid with this approach though. If you need that, I think that there are some options on the File Exchange .

その他の回答 (0 件)

カテゴリ

Find more on Polar Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by