Closed wangshengseee closed 7 months ago
I cannot reproduce the problem on my Win64 computer using R2022b, everything looks perfect (unlike in your ftest.pdf file). See test.pdf
Perhaps you are using a specific Matlab release or other OS where there is a problem, I don't know because you did not provide any information on your environment.
Try to add a call to drawnow
before your call to export_fig
, perhaps this will solve the problem.
I am closing this issue for now. If the problem is consistent and the drawnow workaround did not resolve the problem, then provide additional information about your setup environment and reopen this issue.
I found that if the code is executed in live script, the problem can be reproduced. But everything is good in Script.
MATLAB R2023b Update 2 64-bit(win64)
the location of colorbar is inconsistent with the figure in MATLAB. ftest.pdf