scatter3 not working
7 ビュー (過去 30 日間)
古いコメントを表示
Function scatter3 seems to not working in my matlab. Also when I run examples from references page ex. for Create3DScatterPlotExxample.m only empty coordinates system is displayed and I get no error message. I use MATLAB R2016b.
This is the example code:
figure
[X,Y,Z] = sphere(16);
x = [0.5*X(:); 0.75*X(:); X(:)];
y = [0.5*Y(:); 0.75*Y(:); Y(:)];
z = [0.5*Z(:); 0.75*Z(:); Z(:)];
scatter3(x,y,z)
1 件のコメント
回答 (2 件)
Star Strider
2016 年 12 月 6 日
The example works for me in R2016b as posted in the example.
The first possibility is to consider a path problem. See if running these two lines from your Command Window or your script solves it:
restoredefaultpath
rehash toolboxcache
0 件のコメント
Steven Lord
2016 年 12 月 8 日
Modify your last line to call scatter3 with an output argument.
h = scatter3(x, y, z)
Show what that displays. If that command does not throw an error, also show what these commands display.
ax = ancestor(h, 'axes')
f = ancestor(h, 'figure')
f.Visible
f.Position
f.Units
Those commands will show us information about the axes and figure in which the scatter plot should have been created. The last three commands will tell us if the figure is hidden or has been created off-screen.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!