/paper_quality_plot.matlab

paper_quality_plot.matlab

Primary LanguageMATLABBSD 2-Clause "Simplified" LicenseBSD-2-Clause

paper_quality_plot.matlab

All materials are from Urban Robotics Lab. @KAIST

Original author: Hyungtae Lim (shapelim@kaist.ac.kr)

Advisers: Giseop Kim (paulgkim@kaist.ac.kr), Byeongho YU (bhyu@kaist.ac.kr)


Introduction

This repositoy contains

  • how to use linespecer for beautiful matlab graph

https://kr.mathworks.com/matlabcentral/fileexchange/42673-beautiful-and-distinguishable-line-colors-colormap

  • how to set legend interpreter as latex

  • the method for removing unnecessary white space

  • the method for changing the default tick fonts to the latex version

  • tilelayout (Only applicable on latest version Matlab)

  • thousand seperator

All outputs are located in imgs folder.


Must be added for the Paper-quality Figures

๐Ÿ‘‰ Add set(gca,'LooseInset', max(get(gca,'TightInset'), 0.02)) below the figure declaration line.

๐Ÿ‘‰ Add set(groot, 'defaultAxesTickLabelInterpreter','latex'); below the figure declaration line.

๐Ÿ‘‰ Add ytickformat('%,4.4g'); after plot( ) command (optional).

The template is available on here


When it comes to saving figures in eps...

ENG) I realized that some matlab figures (e.g., bar plot, tiles, or 3D plot) can not be saved in the vector format even though the file format is saved into .eps.

So, we must use below command as follows:

% gcf: figure object
% -r${NUM}: The larger, the higher resolution
print(gcf, "SET_YOUR_FINENAME.png",'-dpng','-r200'); 

KOR) Matlab์—์„œ ์›๋ž˜ eps๋กœ ์ €์žฅํ•˜๋ฉด ์ž๋™์œผ๋กœ ๊ทธ๋ฆผ์ด vector format์œผ๋กœ ๋ณ€๊ฒฝ๋˜์–ด์•ผ ํ•˜๋Š”๋ฐ, ๊ทธ๋ ‡์ง€ ์•Š์€ ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ทธ๋Ÿด ๊ฒฝ์šฐ์—๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด dpi๋ฅผ ์กฐ์ •ํ•˜์—ฌ png๋กœ ๋…ผ๋ฌธ์— ๋„ฃ์„ ์ˆ˜ ๋ฐ–์— ์—†์Šต๋‹ˆ๋‹ค.

% gcf: figure object
% -r${NUM}: The larger, the higher resolution
print(gcf, "SET_YOUR_FINENAME.png",'-dpng','-r200'); 

Description

Note that the effect of the linespecer which is illustrated as:

Before using linespecer

cdf_alpha_before

cdf_beta_before

After using linespecer

cdf_alpha

cdf_beta

linespecer is more beautiful! It allows the figures to be more clean and improves readability.

So, I strongly recommend utilizing linespecer!

Please refer to the line 7 to 9 and 124 to 133 in plot_cdf.m :)

pdf

Note that the built-in pdf function of matlab does not work sometimes. My method is better!

pdf

The trajectory is colored with respect to sequence length.

However, if the trajectory is too long, then it may be not applicable.

caros_tile_output

line1

line2

boxplot1

Only available on R2020a.

barplot

Only available on R2020a.

tilelayout