From 03d456d8904d442da2a6588828076535f4a7fcd0 Mon Sep 17 00:00:00 2001 From: Zheng Ran <72971318+ranzhengcode@users.noreply.github.com> Date: Sat, 30 Jul 2022 16:30:16 +0800 Subject: [PATCH] Update plotUI.m --- GUI/plotUI.m | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/GUI/plotUI.m b/GUI/plotUI.m index 393800a..1b827be 100644 --- a/GUI/plotUI.m +++ b/GUI/plotUI.m @@ -369,9 +369,13 @@ function plotUI() set(cbar,'FontName',fontname,'FontWeight',fontweight,'FontAngle',fontangle,'FontSize',fontsize); axpos = get(gca,'Position'); cpos = get(cbar,'Position'); - cpos(1) = axpos(1)+axpos(3)+0.05; - cpos(2) = axpos(2)+0.1; - cpos(3) = 0.618*cpos(3); + if isOctave + cpos(1) = axpos(1)+axpos(3)+0.05; + cpos(2) = axpos(2)+0.1; + cpos(3) = 0.618*cpos(3); + else + cpos(1) = axpos(1)+axpos(3)+0.065; + end set(cbar,'Position',cpos); proname = [inputData(ind(dk)).mma,char(32),inputData(ind(dk)).name]; @@ -434,9 +438,13 @@ function plotUI() set(cbar,'FontName',fontname,'FontWeight',fontweight,'FontAngle',fontangle,'FontSize',fontsize); axpos = get(gca,'Position'); cpos = get(cbar,'Position'); - cpos(1) = axpos(1)+axpos(3)+0.05; - cpos(2) = axpos(2)+0.1; - cpos(3) = 0.618*cpos(3); + if isOctave + cpos(1) = axpos(1)+axpos(3)+0.05; + cpos(2) = axpos(2)+0.1; + cpos(3) = 0.618*cpos(3); + else + cpos(1) = axpos(1)+axpos(3)+0.065; + end set(cbar,'Position',cpos); proname = [inputData(ind(dk)).mma,char(32),inputData(ind(dk)).name]; @@ -458,9 +466,13 @@ function plotUI() set(cbar,'FontName',fontname,'FontWeight',fontweight,'FontAngle',fontangle,'FontSize',fontsize); axpos = get(gca,'Position'); cpos = get(cbar,'Position'); - cpos(1) = axpos(1)+axpos(3)+0.05; - cpos(2) = axpos(2)+0.1; - cpos(3) = 0.618*cpos(3); + if isOctave + cpos(1) = axpos(1)+axpos(3)+0.05; + cpos(2) = axpos(2)+0.1; + cpos(3) = 0.618*cpos(3); + else + cpos(1) = axpos(1)+axpos(3)+0.065; + end set(cbar,'Position',cpos); % print pic @@ -1286,4 +1298,4 @@ function plotUI() if ishandle(hmsg) close(hmsg); end -end \ No newline at end of file +end