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 vues (au cours des 30 derniers jours)
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 commentaires
dpb
dpb le 28 Juin 2021
Looks like a problem in the Java engine -- which release and is this a new install of MATLAB by any chance?
Saksham Popli
Saksham Popli le 28 Juin 2021
I am using MATLAB online. So, it is the latest version

Connectez-vous pour commenter.

Réponses (1)

Isaac Bruss
Isaac Bruss le 29 Juin 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 commentaire
Isaac Bruss
Isaac Bruss le 29 Juin 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;

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by