Adding points onto a 3D figure in a GUI

I have a 3D plot in a GUI showing position in 3 dimensions and want to display the points at which the velocity of the movement is zero. The line has already been plotted and the values for the targets have already been found but how do I add single points on to this figure?

Réponses (3)

Matt Kindig
Matt Kindig le 22 Avr 2013
Modifié(e) : Matt Kindig le 22 Avr 2013

0 votes

Turn 'hold on', and then call plot3() to plot the points.
Richard
Richard le 22 Avr 2013

0 votes

This didn't work, it was the first thing I tried.

2 commentaires

Matt Kindig
Matt Kindig le 22 Avr 2013
What "didn't work" about it? Can you post your code?
Walter Roberson
Walter Roberson le 22 Avr 2013
Please post your response as a Comment instead of an Answer. You can click on "Comment on this Answer" to do that.

Connectez-vous pour commenter.

Walter Roberson
Walter Roberson le 22 Avr 2013
You can use scatter3(), or you can use plot3() with a marker specifier and no line specifier
plot3(X(:), Y(:), Z(:), 'o')

1 commentaire

Jawahir
Jawahir le 26 Juin 2013
Hi Walter,
I'm facing quite similar problems. I've tried the plot3 function, but when the marker are displayed, the current 3D plot will be gone. Note that I've already run hold on.

Connectez-vous pour commenter.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Question posée :

le 22 Avr 2013

Community Treasure Hunt

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

Start Hunting!

Translated by