Change Stacking Order of Plots
Show older comments
Setting up a manual FEM solver, I found the temperatures at nodes for mesh generated with the PDE Toolbox. I used these temperature values to get the surface plot as shown below.
results = createPDEResults(model,T); % T contains the nodal temperature values
%%
f1 = figure;
pdeplot(results.Mesh, XYData=results.NodalSolution, ZData=results.NodalSolution, ColorMap="jet");
view(2)
axis equal
hold on
pdegplot(model);
hold off
hold on
x = linspace(0,L,20); y = linspace(0,h,10);
[X, Y] = meshgrid(x,y);
[dTdx, dTdy] = evaluateGradient(results, X, Y);
dTdx = reshape(dTdx, size(X));
dTdy = reshape(dTdy, size(Y));
quiver(X, Y, (-k).*dTdx, (-k).*dTdy, "k", "LineWidth", 1);
hold off
h = colorbar;
set(get(h,'title'),'string',('T [°C]'));
clim([min(T), max(T)]);
I have two questions regarding this:
- How can I change the order of the plots so that the quiver plot is seen above the surface plot?
- Is it possible to find the temperature values for points in between the nodes on the plot directly?

Accepted Answer
More Answers (0)
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!