Moving a Marker point across Data using handles "XData"

조회 수: 3 (최근 30일)
Jason
Jason 2015년 11월 9일
답변: Walter Roberson 2015년 11월 9일
I want to translate a cyan circle across a set of peaks on an axes.
I therefore plot assigning the plot to a handle h2. I originally start at the first location
h2=plot(xxx(1),yyy(1),'co')
In a button callback I want to then increment the cyan circle across each peak. I have the locations of the peaks in a vector xxx. It has kindly been suggested to use the handles Xdata of the specific object I want to move, namely the cyan circle.
So I want to use
h2.XData= xxx(i)
where I increment i.
My problem is how do i pass the h2 plot handle (of the cyan circles) to the button callback?

채택된 답변

Walter Roberson
Walter Roberson 2015년 11월 9일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by