소스 검색

set the right order for the plot legends

Fernando Pablo Lopez-Lezcano 10 년 전
부모
커밋
c9649ddf6f
1개의 변경된 파일과 11개의 추가작업 그리고 3개의 파일을 삭제
  1. 11 3
      sphear_fir_render_directions.m

+ 11 - 3
sphear_fir_render_directions.m

@@ -116,9 +116,17 @@ function [BFF] = sphear_fir_render_directions(FIR, fmin, fmax, N, Npre, Nfft, pl
       idx = idx + 1;
     end
 
-    l = legend([p1, p2, p3],
-	       {"XY principal directions", "W (+12dB for clarity)", "XY diagonal directions"});
-    legend(l, 'location', 'southwest');
+    if (strcmp(plot_on, "epsc") || strcmp(plot_on, "pngc"))
+      l = legend([p1, p2, p3],
+		 {"W (+12dB for clarity)", "XY principal directions", "XY diagonal directions"});
+      legend(l, 'location', 'southwest');
+    else
+      %% there seems to be bug with legends in mono, the order of
+      %% the legends seems to be reversed
+      l = legend([p1, p2, p3],
+		 {"XY principal directions", "W (+12dB for clarity)", "XY diagonal directions"});
+      legend(l, 'location', 'southwest');
+    end
     if (strcmp(plot_on, 'eps') || strcmp(plot_on, 'epsc') || plot_on == 1)
       print(f, '-deps', '-tight', copt,["figures/sphear_directions.eps"]);
     else