scatter3 not working
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Réponses (2)
Star Strider
le 6 Déc 2016
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 commentaires
Steven Lord
le 8 Déc 2016
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 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!