- Use the default way to create figures. Just use figure, without any extra properties or callbacks.
- Try not to use code that sets old figure properties or turns off the default interactions.
- If you need special interactions, try using the modern interaction methods.
- When using yyaxis, make sure you are not mixing it with old or outdated plotting functions.
MLX file dual Y-axis plot interaction warning
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
When I use the code above in mlx file in MATLAB2025b, when I open the figure, I receive the warning
figure;
hold on;
yyaxis left
L3 = plot(Test_data_PCCommand_2.('Time (rel)'),Test_data_PCCommand_2.Var10,'-','LineWidth',2,'Color','blue');
L4 = plot(Test_data_PCCommand_2.('Time (rel)'),Test_data_PCCommand_2.Var12,'--','LineWidth',2,'Color','blue');
L5 = plot(Test_data_PCCommand_2.('Time (rel)'),Test_data_PCCommand_2.Var14,'-','LineWidth',2,'Color','green');
L6 = plot(Test_data_PCCommand_2.('Time (rel)'),Test_data_PCCommand_2.Var16,'--','LineWidth',2,'Color','green');
yyaxis right
L2 = plot(Test_data_PCCommand_2.('Time (rel)'),Test_data_PCCommand_2.Var8,'-','LineWidth',2);
L7 = plot(Test_data_PCCommand_2.('Time (rel)'),Test_data_PCCommand_2.Var18,'--','LineWidth',2);
set(gca,'FontSize',11);
ylabel('转矩加载速率/P/I','fontsize',12,'FontName','宋体');
xlabel('时间','fontsize',12,'FontName','宋体');
legend([L2 L3 L4 L5 L6 L7],{'转矩加载速率','外环P','外环I','内环P×10','内环I×10', '燃油增量限制'},'fontsize',12,'location','northwest','FontName','宋体');
grid on;
box on;

警告: 旧探索模式不支持 InteractionOptions。
> 位置:matlab.graphics.interaction.interactionoptions/CartesianAxesInteractionOptions/warnIfUnsupportedFigure
位置: matlab.graphics.interaction.interactionoptions/CartesianAxesInteractionOptions/updateInteractionOptionsAfterSet
位置: matlab.graphics.interaction.graphicscontrol.AxesControl.updateInteractionOptions
警告: 旧探索模式不支持 InteractionOptions。
> 位置:matlab.graphics.interaction.interactionoptions/CartesianAxesInteractionOptions/warnIfUnsupportedFigure
位置: matlab.graphics.interaction.interactionoptions/CartesianAxesInteractionOptions/updateInteractionOptionsAfterSet
位置: matlab.graphics.interaction.interactioncontainers/BaseAxesInteractionContainer/setupInteractions
位置: matlab.graphics.interaction.internal.UnifiedAxesInteractions.createDefaultInteractionsOnAxes
位置: matlab.graphics.interaction.internal.UnifiedAxesInteractions.createDefaultInteractionsInSync
位置: matlab.graphics.interaction.internal.UnifiedAxesInteractions.createDefaultInteractions>@()matlab.graphics.interaction.internal.UnifiedAxesInteractions.createDefaultInteractionsInSync(ax,is2dim,numDataSpaces)
0 commentaires
Réponses (1)
Tridib
le 28 Oct 2025 à 8:45
The warning means that the old figure interaction mode does not support the new InteractionOptions for axes. This usually happens if the figure is made in a way that turns off modern interaction features (by using legacy figure properties or callbacks). The warning is just for your information and does not affect how your plot or data looks. Some interactive features, like pan, zoom, or data tips, might not work as expected or could be missing.
You may try these steps which might help avoid the warning:
Hope this helps!
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!