Clear Filters
Clear Filters

Brush error within multiple function gui

4 views (last 30 days)
curoi on 14 Nov 2014
Edited: curoi on 14 Nov 2014
I'm getting the following error when trying to run the function brush 'on' in a function being called by another function being called by a guide gui:
Error using set
Handle must be a uicontextmenu
Error in datamanager.brushobj/addContextMenu (line 40)
Error in datamanager.lineseries/draw (line 39)
Error in datamanager.series/init (line 36)
Error in datamanager.lineseries (line 4)
Error in datamanager/enableBrushing (line 37)
hout = datamanager.lineseries(h);
Error in brush>locGetMode (line 212)
Error in brush (line 114)
locGetMode(f); % Creates the mode
Error in f_edit_timecoord (line 38)
brush on;
Error in f_determine_coords2 (line 65)
[j_R,k_R,x_a,y_a] = f_edit_timecoord(aa,AA,tog,savepath,listname);
Error in marigram2>ProcessGroup_SelectionChangeFcn (line 532)
[j_R, k_R, x_a, y_a, filedata, presavepath, guios] = ...
Error in gui_mainfcn (line 96)
Error in marigram2 (line 44)
gui_mainfcn(gui_State, varargin{:});
Error in
Error in hgfeval (line 63)
Error in uitools.uibuttongroup/childAddedCbk>manageButtons (line 79)
hgfeval(cbk, source, evdata);
Error while evaluating uicontrol Callback
The error comes after the following code in the function:
load( [savepath, '\', listname, '_HiLoMisc_pts.mat'] );
imshow( AA );
hold on;
h2 = plot( aa, jlo, klo, 'ro', 'MarkerSize', 16, 'LineWidth', 2 );
h3 = plot( aa, jhi, khi, 'go', 'MarkerSize', 16, 'LineWidth', 2 );
h4 = plot( aa, jmisc, kmisc, 'co', 'MarkerSize', 16, 'LineWidth', 2 );
hold off;
brush on;
hBrushLine = findall( aa, 'tag', 'Brushing' );
This was working earlier when I was running the gui.m file but now it just looks like it isn't working with the current figure. I've tried to do the following alternatives:
hFig = gcf;
hbrush = brush( hFig );
set( hbrush, 'Enable', 'on' );
hFig = gcf;
hbrush = brush( hFig, 'on' );
But neither of these work.

Answers (0)


Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!