Subplot error: No constructor 'handle.listener' with matching signature found. (Matlab 2014b)

21 views (last 30 days)
Hi,
I just upgraded to Matlab 2014b, 64-bits on a windows 7 pc. I'm trying to make a figure with subplots, but I get an error, even when I just try to run the example from the Matlab documentation:
x = linspace(0,10);
y1 = sin(x);
y2 = sin(5*x);
figure
subplot(2,1,1);
plot(x,y1)
subplot(2,1,2);
plot(x,y2)
--------------------
No constructor 'handle.listener' with matching signature found.
Error in subplot>createListeners (line 495)
list = [...
Error in subplot>addAxesToGrid (line 549)
createListeners(p,handle(list));
Error in subplot (line 467)
addAxesToGrid(ax,nrows,ncols,row,col,position);
A figure with axes for the first subplot is made, but nothing is plotted, if I now run the line
"plot(x,y1)" again, the line is plotted.
Any idea what I might be doing wrong? Your help is mostly appreciated!
Marjolein

Accepted Answer

Nikolas
Nikolas on 10 Dec 2014
Edited: Nikolas on 10 Dec 2014
I had the same issue, it turns out that in my libraries I was using a modified version of the subplot.m function (modified in the past for irrelevant reasons) and when trying to use the subplot, Matlab was using my command instead of the built-in one. So when you get the error, click on the error message with the line number and see which m-file is opened. Then just rename/delete that m-file and restart Matlab.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!