Skip to content

Commit fa4963c

Browse files
authored
Update velasPlot.m
1 parent 79ebdf0 commit fa4963c

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

velasPlot.m

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
mpctrl = true; % true or false
4141
flag = 'Mollweide'; % flag = {'Gall-Peters','Robinson','Hammer-Aitoff','Mollweide'};
4242
nmesh = 7;
43-
cmap = 'jet';
43+
cmapname = 'jet';
44+
cmap = colormapdata(cmapname);
4445
lineStyle = '--';
4546

4647
%% Basic setting
@@ -51,7 +52,15 @@
5152
% Font setting
5253
fontname = 'Times New Roman';
5354
fontweight = 'bold';
54-
fontsize = 20;
55+
fontangle = 'normal';
56+
fontcolor = 'k';
57+
fontsize = 20;
58+
59+
font.fontname = fontname;
60+
font.fontweight = fontweight;
61+
font.fontangle = fontangle;
62+
font.fontcolor = fontcolor;
63+
font.fontsize = fontsize;
5564

5665
hmsg = msgbox('Plotting start!', 'VELAS reminder','help');
5766
pause(0.8);
@@ -342,9 +351,13 @@
342351
set(cbar,'FontName',fontname,'FontSize',fontsize,'FontWeight',fontweight);
343352
axpos = get(gca,'Position');
344353
cpos = get(cbar,'Position');
345-
cpos(1) = axpos(1)+axpos(3)+0.05;
346-
cpos(2) = axpos(2)+0.1;
347-
cpos(3) = 0.618*cpos(3);
354+
if isOctave
355+
cpos(1) = axpos(1)+axpos(3)+0.05;
356+
cpos(2) = axpos(2)+0.1;
357+
cpos(3) = 0.618*cpos(3);
358+
else
359+
cpos(1) = axpos(1)+axpos(3)+0.065;
360+
end
348361
set(cbar,'Position',cpos);
349362
proname = [inputData(ind(dk)).mma,char(32),inputData(ind(dk)).name];
350363

@@ -405,9 +418,13 @@
405418
set(cbar,'FontName',fontname,'FontSize',fontsize,'FontWeight',fontweight);
406419
axpos = get(gca,'Position');
407420
cpos = get(cbar,'Position');
408-
cpos(1) = axpos(1)+axpos(3)+0.05;
409-
cpos(2) = axpos(2)+0.1;
410-
cpos(3) = 0.618*cpos(3);
421+
if isOctave
422+
cpos(1) = axpos(1)+axpos(3)+0.05;
423+
cpos(2) = axpos(2)+0.1;
424+
cpos(3) = 0.618*cpos(3);
425+
else
426+
cpos(1) = axpos(1)+axpos(3)+0.065;
427+
end
411428
set(cbar,'Position',cpos);
412429
proname = [inputData(ind(dk)).mma,char(32),inputData(ind(dk)).name];
413430

@@ -429,9 +446,13 @@
429446
set(cbar,'FontName',fontname,'FontSize',fontsize,'FontWeight',fontweight);
430447
axpos = get(gca,'Position');
431448
cpos = get(cbar,'Position');
432-
cpos(1) = axpos(1)+axpos(3)+0.05;
433-
cpos(2) = axpos(2)+0.1;
434-
cpos(3) = 0.618*cpos(3);
449+
if isOctave
450+
cpos(1) = axpos(1)+axpos(3)+0.05;
451+
cpos(2) = axpos(2)+0.1;
452+
cpos(3) = 0.618*cpos(3);
453+
else
454+
cpos(1) = axpos(1)+axpos(3)+0.065;
455+
end
435456
set(cbar,'Position',cpos);
436457

437458
% print pic
@@ -1236,4 +1257,4 @@
12361257
if ishandle(hmsg)
12371258
close(hmsg);
12381259
end
1239-
end
1260+
end

0 commit comments

Comments
 (0)