Change Data Cursor text
12 次查看(过去 30 天)
显示 更早的评论
Hello, i try to change the data tip of the data cursor and use this function:
function txt = myupdatefcn(empt,event_obj)
% Customizes text of data tips
handles = getappdata(gcf,'mydata');
pos = get(event_obj,'Position');
flux = handles.S.PoolNames(pos(1));
pool = handles.S.FluxNames(pos(2));
wert = handles.S.Stoich(pos(2),pos(1));
txt = {['Flux: ',flux{1}],['Pool: ',pool{1}],['Wert: ',wert{1}]};
In the OpeningFcn of the gui i call this function:
dcm = datacursormode(hObject);
set(dcm,'Enable','on','UpdateFcn',@myupdatefcn);
But it did not work and I can't find my mistake. Can anyone help me?
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!