Skip to content

Commit 754cab1

Browse files
authored
Merge pull request #13886 from rmcdermo/master
Matlab: fix figure visibility during processing for atmospheric_bound…
2 parents 19e3ab8 + 02e7902 commit 754cab1

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

Utilities/Matlab/scripts/atmospheric_boundary_layer.m

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
z = [z_0{i} 10*z_0{i} 1 2 3 4 5 6 7 8 9 10 15 20 25 30 50 100];
5050

51-
figure(1)
51+
f1=figure;
5252
set(gca,'Units',Plot_Units)
5353
set(gca,'Position',[Plot_X Plot_Y Plot_Width Plot_Height])
5454

@@ -68,7 +68,7 @@
6868
T = T + (theta_0-T(12));
6969

7070
plot(u,z,'ko'); hold on
71-
plot(M2.data(:,2),M2.data(:,1),'k-'); hold on
71+
plot(M2.data(:,2),M2.data(:,1),'k-'); hold off
7272
set(gca,'FontName',Font_Name)
7373
set(gca,'FontSize',Title_Font_Size)
7474
axis([0 u_high{i} 0 100])
@@ -88,21 +88,19 @@
8888
git_file = [datafile, '_git.txt'];
8989
addverstr(gca,git_file,'linear')
9090

91-
set(gcf,'Visible',Figure_Visibility);
92-
set(gcf,'Units',Paper_Units);
93-
set(gcf,'PaperUnits',Paper_Units);
94-
set(gcf,'PaperSize',[Paper_Width Paper_Height]);
95-
set(gcf,'Position',[0 0 Paper_Width Paper_Height]);
96-
print(gcf,'-dpdf',[outfile '_vel'])
91+
set(f1,'Visible',Figure_Visibility);
92+
set(f1,'Units',Paper_Units);
93+
set(f1,'PaperUnits',Paper_Units);
94+
set(f1,'PaperSize',[Paper_Width Paper_Height]);
95+
set(f1,'Position',[0 0 Paper_Width Paper_Height]);
96+
print(f1,'-dpdf',[outfile '_vel'])
9797

98-
clf('reset')
99-
100-
figure(2)
98+
f2=figure;
10199
set(gca,'Units',Plot_Units)
102100
set(gca,'Position',[Plot_X Plot_Y Plot_Width Plot_Height])
103101

104102
plot(T-273.15,z,'ko'); hold on
105-
plot(M2.data(:,3),M2.data(:,1),'k-'); hold on
103+
plot(M2.data(:,3),M2.data(:,1),'k-'); hold off
106104
set(gca,'FontName',Font_Name)
107105
set(gca,'FontSize',Title_Font_Size)
108106
axis([T_low{i} T_high{i} 0 100])
@@ -114,13 +112,11 @@
114112

115113
addverstr(gca,git_file,'linear')
116114

117-
set(gcf,'Visible',Figure_Visibility);
118-
set(gcf,'Units',Paper_Units);
119-
set(gcf,'PaperUnits',Paper_Units);
120-
set(gcf,'PaperSize',[Paper_Width Paper_Height]);
121-
set(gcf,'Position',[0 0 Paper_Width Paper_Height]);
122-
print(gcf,'-dpdf',[outfile '_tmp'])
123-
124-
clf('reset')
115+
set(f2,'Visible',Figure_Visibility);
116+
set(f2,'Units',Paper_Units);
117+
set(f2,'PaperUnits',Paper_Units);
118+
set(f2,'PaperSize',[Paper_Width Paper_Height]);
119+
set(f2,'Position',[0 0 Paper_Width Paper_Height]);
120+
print(f2,'-dpdf',[outfile '_tmp'])
125121

126122
end

0 commit comments

Comments
 (0)