Get coordinates from image (imagesc) in guide
古いコメントを表示
Hi All, I may have a misunderstanding of how data habndling or axes work when using guide. Here's my problem: I create a basic GUI with two axes (axes1 and axes2), and one static text.
When clicking axes1 I want to display the coordinates in the static text:
function axes1_ButtonDownFcn(hObject, eventdata, handles)
coord = handles.axes1.CurrentPoint;
handles.text2.String = sprintf('%f ',coord);
guidata(hObject, handles);
This works, I get three pairs of values when I click in the figure.
However, when I load data and put the data into axes1, clicking does not work anymore...
function GuideTest_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
handles.results = load('results.mat');
imagesc(handles.axes1,handles.results.Fr1);
guidata(hObject, handles);
The data which I expect is displayed nicely in the figure, but clicking does not seem to do anything anymore... What am I missing regarding handles, data transfers or callbacks?
Thanks! Karel
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!