How to best update filled area 2D plot?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Steven Terrana
am 1 Mär. 2015
Beantwortet: Steven Terrana
am 4 Mär. 2015
Hello,
I am creating an animation in which an animated line travels across the figure window.
When this line crosses through predefined bounds, I need to make an area object update in real time concurrently with the animated line.
My problem is when the second area plot is created, it changes the colors of the previous area plot as well as connects their edges.
An example of the problem looks like this: When i try to update the bounds of the furthest right area plot, the following occurs.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147391/image.jpeg)
Then, i update the XData and YData properties of that area object and the following occurs
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147392/image.jpeg)
I am positive that my new XData and YData vectors are the appropriate sizes/values.
I have tried deleting the object and remaking it, but this does not flow smoothly.
Any help would be appreciated as to why this is happening.
Thanks for your time!
Steven.
2 Kommentare
Image Analyst
am 2 Mär. 2015
Are you using the animatedline() function? Where's your code? Are you changing colormaps at any time?
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Animation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!