Can I have a background and foreground axis ?

조회 수: 7 (최근 30일)
Jean Bilheux
Jean Bilheux 2013년 1월 16일
I built a GUI where I let the user select various region of interest (ROI) on a histogram plot. When the user click the plot, I have to refresh the main histogram plot (imhist) then refresh the ROI... this process is very slow as it takes 1 to 2 seconds to refresh the entire plot. I wanted to provide the option to move a ROI but due to the slow refresh, that's not even possible. What could work is having as a 'background' axis the imhist plot, and in a foreground axis, the ROIs.... the user would then only modify the foreground axis... no need then to refresh the background axis. Is that possible ?

채택된 답변

Walter Roberson
Walter Roberson 2013년 1월 16일
Yes. You can have overlapping axes. Set the Color of the top axis to 'none' to be able to see the parts underneath. If you define your ROI as an image or as a patch you may need to set AlphaData properties to be able to see what should be logically underneath.
However, it sounds to me like you do not need to do this: that you should simply record the handles of the ROI and when the user moves the ROI, set() its new coordinates and drawnow() once you have adjusted all the handles you need adjusted.
  댓글 수: 1
Jean Bilheux
Jean Bilheux 2013년 1월 17일
Sounds great. I'm gonna try this. Thanks a lot.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jan
Jan 2013년 1월 16일
See the plotyy command, which creates 2 axes also: edit plotyy.
  댓글 수: 1
Jean Bilheux
Jean Bilheux 2013년 1월 17일
I will take a look at that too. Thanks so much.

댓글을 달려면 로그인하십시오.

카테고리

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