add points to plot
Show older comments
I'm using the following code to add points to a plot the fastest way possible. But this way I need to read the existing points, add the news and set them back. Is there a simpler way?
if ishandle(handle_in)
set(handle_in,'XData',[get(handle_in,'XData') posicaoX],'YData',[get(handle_in,'YData') posicaoY]);
handle_out=handle_in;
else handle_out=plot(posicaoX,posicaoY,options,'LineWidth',1,'MarkerSize',10);
end
1 Comment
Andrew Newell
on 4 Mar 2011
Could you please format this code so that it is more readable? See http://www.mathworks.com/matlabcentral/answers/help/markup.
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!