How can I use the compass function, changing the vector position during the time?

3 views (last 30 days)
Hi. I'm using serial port to collect data and I need to plot it using the fucntion compass. For each data sample, I need to update the plot using compass (arrows emanating from the origin). I'm using this code now:
axes(handles.axes3)
h=compass(eletrodo1, eletrodo2);
hold on;
drawnow;
The problem is, when I update the plot with new data, the past data still remains on the plot. I don't know how to clean the plot for each new data point. Can someone help me? Thank you.

Accepted Answer

Star Strider
Star Strider on 31 Aug 2015
I can’t say for sure, but deleting the hold on call might do what you want.

More Answers (0)

Categories

Find more on Graphics Performance 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!