Plot two sets of markers in GUI
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hi,
I am creating a GUI. It displays a graph and marks a few indexes using plot and markers (upper image). now I want to mark again some of the previous indexes, but when I try to do so - all the first markers are deleted.
this is the first plot of a graph + markers:
"plot(handles.axesNS1, handles.sigNV(:,1), handles.sigNV(:,2), '-*','MarkerIndices', handles.presentedRRNS1, 'MarkerEdgeColor','red', 'MarkerSize', 6)"
It works fine and plots red markers (upper image). then I add the following command in the next row:
"plot(handles.axesNS1, handles.sigNV(:,1), handles.sigNV(:,2), 'o', 'MarkerIndices', handles.Missed_NS1, 'MarkerEdgeColor','black', 'MarkerSize', 7)"
and it deletes all red markers and displays just the black ones. (lower image)
how can I display this graph with both groups of markers one on each other?
Note: when I use the same method outside the GUI - it works fine and both markers appear.

댓글 수: 0
답변 (1개)
Rik
2018년 12월 3일
0 개 추천
댓글 수: 2
Kevin Chng
2018년 12월 4일
try
hold(handles.axesNS1,'on')
Rik
2018년 12월 4일
So if you use this:
plot(handles.axesNS1, handles.sigNV(:,1), handles.sigNV(:,2), '-*','MarkerIndices', handles.presentedRRNS1, 'MarkerEdgeColor','red', 'MarkerSize', 6)
set(handles.axesNS1,'NextPlot','add')
plot(handles.axesNS1, handles.sigNV(:,1), handles.sigNV(:,2), 'o', 'MarkerIndices', handles.Missed_NS1, 'MarkerEdgeColor','black', 'MarkerSize', 7)
that still results in the wrong result?
Try to make a MWE so we can run your code without any other dependencies and can reproduce your issue.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!