UpdateGraphProperty_jd

PURPOSE ^

SYNOPSIS ^

function UpdateGraphProperty_jd(hObject, eventdata, handles, axes, selectedgraphs, property, listofitems)

DESCRIPTION ^

 This function updates any property of the selected graphs in axes.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function UpdateGraphProperty_jd(hObject, eventdata, handles, axes, selectedgraphs, property, listofitems)
0002 %
0003 % This function updates any property of the selected graphs in axes.
0004 %
0005 NumberOfPropertyItems = 0;
0006 PropertyItems = {};
0007 for iGraph = 1:length(handles.graphs),
0008     if isequal(handles.graphs{iGraph}.axes,axes)...
0009      & min(abs(selectedgraphs - iGraph)) == 0,
0010         NumberOfPropertyItems = NumberOfPropertyItems + 1;
0011         PropertyItems{NumberOfPropertyItems} = get(handles.graphs{iGraph}.hgraph,property);
0012     end
0013 end
0014 %
0015 if isempty(PropertyItems),
0016     set(hObject,'Value',1);
0017     return
0018 end
0019 %
0020 PropertyItemsRef = PropertyItems{1};
0021 for iPropertyItems = 2:length(PropertyItems),
0022     if ~isequal(PropertyItemsRef,PropertyItems{iPropertyItems}),
0023         set(hObject,'Value',1);
0024         return
0025     end
0026 end
0027 %
0028 for iItem = 1:length(listofitems),
0029     if isequal(PropertyItemsRef,listofitems{iItem}),
0030         set(hObject,'Value',iItem + 2);
0031     end
0032 end
0033 %

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.