"TiledChartLayout cannot be a parent." error message using pdeplot with tiledlayout
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Matt J
el 5 de Oct. de 2023
Editada: Matt J
el 5 de Oct. de 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.
Ver también
Categorías
Más información sobre Geometry and Mesh en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

