Why does figure(2) keeps overwriting the previous figure?
53 views (last 30 days)
I try to open figure(2) in a different window but it keeps overwriting the previous figure.
I am currently working with MATLAB R2020a.
I tried something very simple as such:
figure(1) and (3) always open in a separate window but figure(2) keeps overwriting figure(1).
See attached figures
Does anyone know how to fix this?
Sina Rangriz on 10 Aug 2021
Edited: Sina Rangriz on 10 Aug 2021
use save command to see whether it is working
I was running your three lines in matlab 2020b and it shows seperate figures with correct labels.
check your other parts of your code to see whether something shadows your plot