How do i get the colorbar and plot axes to remain the same during iteration?

5 views (last 30 days)
I am trying to visualise a flow field for a cfd application. I can get the contourf and surf plots to work nicely, but as soon as i add the colorbar, the axes of the plot get REALLY small, and basically disappears! I have seen that there is a handle for the axes, but I have failed to be able to use it... COLORBAR('peer',AX) creates a colorbar associated with axes AX instead of the current axes.
surf(xp(2:nXp-1,2:nYp-1),yp(2:nXp-1,2:nYp- 1),(uplotloc.^2+vplotloc.^2),'FaceAlpha',0.6)
axis([0 w 0 h])
axsurf = [0 w 0 h];
shading flat;
title('Velocity field')
%hold on
colorbar('peer',axsurf)
Also, I would ideally like both the quiver plot AND the surf plot to be overlayed onto eachother... but it seems that all of the surf plots just keep piling up on eachother and the transparency (to see quiver) is lost!
I would like to show you the plots, but I am not sure how to use the "image" icon on this forum... because i would like the axes on other plots that i have to get larger as the iteration continues... i.e. i am monitoring residuals, and as they decrease to below say, 1e-3... the plot does not adjust, even though i have set the limits to plus and minus inifinity... is there a way to plot in log maybe?
I'd appreciate any assitance!
Best Regards, Michael
Also, is there a good place to find out how to use LaTeX to make nice plots

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!