瀏覽代碼

printing changes tuning for publication quality

Fernando Pablo Lopez-Lezcano 10 年之前
父節點
當前提交
f1cc1ca19d
共有 1 個文件被更改,包括 15 次插入 和 9 次删除
  1. 15 9
      sphear_fir_design.m

+ 15 - 9
sphear_fir_design.m

@@ -43,7 +43,9 @@
 
 function [FIR] = sphear_fir_design(F, A2BF, n, maxboost, Fs, Fl, plot_on, W, X, Y, Z)
 
-  fig = figure;
+  if (plot_on != 0)
+    fig = figure;
+  end
 
   if (exist("W") == 1 && ! exist("Z"))
     %% Z was not supplied, just average X and Y data
@@ -188,25 +190,29 @@ function [FIR] = sphear_fir_design(F, A2BF, n, maxboost, Fs, Fl, plot_on, W, X,
 	  copt = '-mono';
 	  cext = "_mono";
 	end
-	axis([300, (Fs/2)]);
-	tics('x', [300, 500, 1000, 2000, 3000, 5000, 7000, 10000, 15000, 20000]);
 	grid on;
+	axis([300, (Fs/2)]);
+	xticks = [300, 500, 1000, 2000, 3000, 5000, 7000, 10000, 20000];
+	set(gca, 'XTick', xticks);
+	set(gca, 'XTickLabel', sprintf('%d|', xticks));
+	ca=get (gcf, "currentaxes");
+	set(ca,"fontweight","bold","linewidth",1.5)
 	pbaspect([16, 9, 1])
-	title(sprintf("B format FIR filters (transition frequency: %d Hz)", Fl));
+	%% title(sprintf("B format FIR filters (transition frequency: %d Hz)", Fl));
 	hold on;
 	%% plot real measured points
-	ph = semilogx(F, 20*log10(abs(A2BF(:,c,b)))', popts);
+	%% ph = semilogx(F, 20*log10(abs(A2BF(:,c,b)))', popts, "linewidth", 1.5);
 	%% plot extrapolated filter
 	if (b == 1)
 	  %% W
-	  wh = semilogx(fi*(Fs/2), 20*log10(abs(ri)), wopts);
+	  wh = semilogx(fi*(Fs/2), 20*log10(abs(ri)), wopts, "linewidth", 1.5);
 	else
 	  if (b == 4)
 	    %% Z
-	    zh = semilogx(fi*(Fs/2), 20*log10(abs(ri)), zopts);
+	    zh = semilogx(fi*(Fs/2), 20*log10(abs(ri)), zopts, "linewidth", 1.5);
 	  else
 	    %% XY
-	    xyh = semilogx(fi*(Fs/2), 20*log10(abs(ri)), xyopts);
+	    xyh = semilogx(fi*(Fs/2), 20*log10(abs(ri)), xyopts, "linewidth", 1.5);
 	  end
 	end
       end
@@ -218,7 +224,7 @@ function [FIR] = sphear_fir_design(F, A2BF, n, maxboost, Fs, Fl, plot_on, W, X,
   
   if (plot_on != 0)
     l = legend([wh, zh, xyh], {'W', 'XY', 'Z'});
-    legend(l, 'location', 'southwest');
+    legend(l, 'location', 'west');
     if (exist("W") == 1)
       if (strcmp(plot_on, 'eps') || strcmp(plot_on, 'epsc') || plot_on == 1)
 	print(fig, '-deps','-tight',copt,["figures/wxyz_filter_ff" cext ".eps"]);