When I am trying to subplot using for loop. I am getting this error. However, the curve is getting plotted correctly. Please suggest what's the matter
3 views (last 30 days)
Show older comments
Unrecognized method, property, or field 'InteractionsManager' for class 'matlab.graphics.primitive.canvas.JavaCanvas'.
Error in matlab.graphics.internal.FigureToolstripManager.addGCAInteractions (line 504)
can.InteractionsManager.registerInteraction(ax(k),inter{end});
Error in matlab.graphics.internal.FigureToolstripManager>@()matlab.graphics.internal.FigureToolstripManager.addGCAInteractions(f,d.Child) (line 586)
@(e,d) matlab.graphics.internal.drawnow.callback(@() matlab.graphics.internal.FigureToolstripManager.addGCAInteractions(f, d.Child)));
2 Comments
dpb
on 28 Jun 2021
Looks like a problem in the Java engine -- which release and is this a new install of MATLAB by any chance?
Answers (1)
Isaac Bruss
on 29 Jun 2021
I am able to recreate this error only in MATLAB Online by running the following .m file from the command line:
subplot(2,1,1)
image(imread('cameraman.tif'));title('Anything');axis equal tight;
subplot(2,1,2)
image(imread('cameraman.tif'));title('test image');hold on;axis equal tight;
I'm looking into this.
1 Comment
Isaac Bruss
on 29 Jun 2021
While we look into this specific issue, you might try tiledlayout. This is a new and preferred workflow for creating multiple figures. The code would look something like the following:
tiledlayout(2,1)
nexttile
image(imread('cameraman.tif'));title('Anything');axis equal tight;
nexttile
image(imread('cameraman.tif'));title('test image');hold on;axis equal tight;
See Also
Categories
Find more on Subplots 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!