"TiledChartLayout cannot be a parent." error message using pdeplot with tiledlayout
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
Matt J
2023-10-5
编辑:Matt J
2023-10-5
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

