pcolor: too many input arguments when called twice

2 views (last 30 days)
I have a gui file 'window.m' in which a pseudocolor plot is created after the certain button is pressed. When I press this button for the first time, everything works correctly. When I press it for the second - I get an error:
Error using pcolor (line 46)
Too many input arguments.
Error in window>plotting_Callback (line 191)
h=pcolor(axesHandle1,x,x,sur);
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in window (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)window('plotting_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
It's hard for me to understand why 'pcolor' has too many input arguments when called for the second time. What may be the possible ways to solve the problem?
  3 Comments
Sergei
Sergei on 3 Sep 2013
function plotting_Callback(hObject, eventdata, handles)
<...>
acc=1000;
x=-25:50/acc:25;
axesHandle1= findobj(gcf,'Tag','axes1');
h=pcolor(axesHandle1,x,x,sur);
<...>
'sur' is a 2-dimentional array
Walter Roberson
Walter Roberson on 3 Sep 2013
Vague possibility: another pcolor() has become established on the path. Use
which -all pcolor
Try inserting that just before the pcolor() call and see if the results differ between the two presses.

Sign in to comment.

Answers (0)

Categories

Find more on Geographic Plots 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!