"TiledChartLayout cannot be a parent." error message using pdeplot with tiledlayout
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to plot multiple solutions obtained with the PDE Modeling next to each other. Using subplot works just fine, but I want to use the more flexible tiledlayout command. However, this gives the error message "Error using uicontextmenu; TiledChartLayout cannot be a parent". Here's a MWA (the first few lines are just to have a solution to a PDE problem):
clear; close all
model = createpde;
geometryFromEdges(model,@lshapeg);
generateMesh(model);
applyBoundaryCondition(model,"dirichlet",Edge=1:model.Geometry.NumEdges,u=0);
specifyCoefficients(model,m=0, d=0, c=1, a=0, f=1);
results = solvepde(model);
% this works fine
subplot(1,2,1);
pdeplot(model,"XYData",results.NodalSolution);
subplot(1,2,2);
pdeplot(model,"XYData",results.NodalSolution);
% this one doesn't
figure;
tiledlayout(1,2);
nexttile;
pdeplot(model,"XYData",results.NodalSolution);
nexttile;
pdeplot(model,"XYData",results.NodalSolution);
Any tips how to solve the issue?
2 commentaires
Matt J
le 5 Oct 2023
Modifié(e) : Matt J
le 5 Oct 2023
I don't think there is a solution that would allow you to use tiledlayout. It would be helpful to know what tiledlayout functionality you are looking to use which you think subplot doesn't offer. There are many File Exchange tools designed to give similar functionality as tiledlayout, but using only the subplot framework.
Voir également
Catégories
En savoir plus sur Geometry and Mesh dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

