How to set background image for changing plot without using hold on/off?
Show older comments
Hey Guys!
I have simulated the heat transfer in a Turbine Injector and save the corresponding temperatures for many timesteps in a matrix. I now want to plot this matrix succesively for different timesteps to show the evolution of the heat. However, behind this plot I want to show a picture of the 2D Drawing of the Injector so that you can see where actually the heat is flowing to.
The code shown here works but obviously in this case the drawing of the injector gets replaced by the plotting of the matrix. If I use hold on/off however, the drawing of the injector stays but all the imagesc-plots are overlaid, which I also don't want.
Any ideas?
Thanks so much!
% hold on?
imshow(drawing_2D_injector);
for i = 1:num %timesteps
for j = 1:39
a = coords{j}; % in coords the coordinates of the flow areas are saved
A(a) = B(i,j); % in B the temperatures are saved
end
colormap(jet);
imagesc(A,'AlphaData',0.7);
drawnow
pause(0.1)
end
Accepted Answer
More Answers (0)
Categories
Find more on Graphics Performance 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!