README.md

May 6, 2026 · View on GitHub

paper_quality_plot.matlab



The actual MATLAB plotting code Hyungtae Lim has used across his published papers.

All materials are from Urban Robotics Lab. @KAIST  ·  Author: Hyungtae Lim (shapelim@kaist.ac.kr)

(01.09.25) I have now given up on sticking solely to MATLAB (still prefer MATLAB though). SciencePlots is truly an excellent tool.


:rocket: 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.


:hammer: Must be added for the Paper-quality Figures

:point_right: Add set(gca,'LooseInset', max(get(gca,'TightInset'), 0.02)) below the figure declaration line.

:point_right: Add set(groot, 'defaultAxesTickLabelInterpreter','latex'); below the figure declaration line.

:point_right: Add ytickformat('%,4.4g'); after plot( ) command (optional).

The template is available on here


:warning: 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','-r300'); 

KOR) Matlab에서 원래 eps로 저장하면 자동으로 그림이 vector format으로 변경되어야 하는데, 그렇지 않은 경우가 있습니다.

그럴 경우에는 아래와 같이 dpi를 조정하여 png로 논문에 넣을 수 밖에 없습니다.

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

A compact map of representative outputs in imgs/. Click any preview or script name to open the MATLAB source.

This section is generated by scripts/update_readme.py and checked by CI.

B-mIoU vs pixel threshold
B-mIoU vs pixel threshold
Line graph
linegraph_biou_pxthr.m
Caros flight data
Caros flight data
Line graph
linegraph_caros.m
ERASOR ground threshold
ERASOR ground threshold
Line graph
linegraph_erasor_ground.m
Hydra2.0 PR-curve
Hydra2.0 PR-curve
Line graph
linegraph_hydra_pr.m
VGGT confidence sweep
VGGT confidence sweep
Line graph
linegraph_vggt.m
DeepLabv3 / HRNet / OCRNet / UPerNet
DeepLabv3 / HRNet / OCRNet / UPerNet
Horizontal bar
horizontal_bars_deeplabv3.m
B-mIoU per pixel threshold
B-mIoU per pixel threshold
Horizontal bar
horizontal_bars_hrnet.m
GPF vs R-GPF precision
GPF vs R-GPF precision
Vertical bar
barplot_gpf_precision.m
Max-clique inlier counts
Max-clique inlier counts
Vertical bar
barplot_maxclique.m
Quatro runtime breakdown
Quatro runtime breakdown
Vertical bar
barplot_quatro_runtime.m
Success rate across methods
Success rate across methods
Vertical bar
barplot_success_rate.m
AOA / SSA error
AOA / SSA error
Box plot
boxplot_aoa_ssa.m
Method runtime
Method runtime
Box plot
boxplot_runtime.m
Alpha / beta angle CDFs
Alpha / beta angle CDFs
CDF
cdf_angles.m
Chamfer-distance CDF
Chamfer-distance CDF
CDF
cdf_chamfer.m
ERASOR scan-ratio
ERASOR scan-ratio
PDF
pdf_erasor_scan_ratio.m
PR + F1-vs-threshold
PR + F1-vs-threshold
PR curve
prcurve_hydra.m
3D UTM with colour gradient
3D UTM with colour gradient
Trajectory
trajectory_3d_utm.m
VBR dataset trajectories
VBR dataset trajectories
Trajectory
trajectory_vbr.m
TIMS weights heatmap
TIMS weights heatmap
Scatter with heatmap
scatter_heatmap_weights.m
PaSGA ring/sector ablation
PaSGA ring/sector ablation
Tilelayout
tilelayout_pasga.m
Xavier per-stage time
Xavier per-stage time
Stacked area
area_xavier_time.m

Script index

TypeScriptsRepresentative outputs
Line graphlinegraph_biou_pxthr.m
linegraph_caros.m
linegraph_erasor_ground.m
linegraph_hydra_pr.m
linegraph_vggt.m
biou_line_graph.png
caros_rotor_speed.png
erasor_ground_preservation.png
hydra2_0_precision.png
vggt_ate.png
Horizontal barhorizontal_bars_deeplabv3.m
horizontal_bars_hrnet.m
horizontal_bar_w_deeplabv3.png
biou_horizontal_bar_w_hrnet_3px.png
Vertical barbarplot_gpf_precision.m
barplot_maxclique.m
barplot_quatro_runtime.m
barplot_success_rate.m
ground_bar_plot_v2.png
num_MC.png
average_computational_time_v2_i7.png
SuccessRate1_quatro_pp.png
Box plotboxplot_aoa_ssa.m
boxplot_runtime.m
boxplot1.png
box_plot2_r300.png
CDFcdf_angles.m
cdf_chamfer.m
total_cdf_alpha.png
cdf_for_chamfer_distance.png
PDFpdf_erasor_scan_ratio.merasor_pdf_diff_percentage.png
PR curveprcurve_hydra.mprecision_recall_curve.png
Trajectorytrajectory_3d_utm.m
trajectory_vbr.m
Navigation_trajectory.png
campus_train0_gt.png
Scatter with heatmapscatter_heatmap_weights.mtims_rotation_v30.png
Tilelayouttilelayout_pasga.mfinal_tilelayout.png
Stacked areaarea_xavier_time.mtime_stacked.png

Output collisions: these scripts intentionally write the same filenames as a primary script above.


:page_facing_up: Notes

Linespecer comparison

cdf_angles.m is the clearest example of why this repository uses linspecer: the same CDFs become easier to distinguish once the color set is changed.

Before After
alpha CDF before linespecer alpha CDF after linespecer
beta CDF before linespecer beta CDF after linespecer

Please refer to the % --- Colors --- block in cdf_angles.m.

Implementation notes

TopicNote
PDF estimationpdf_erasor_scan_ratio.m uses a manual PDF calculation because MATLAB's built-in PDF behavior can be unreliable for this use case.
3D trajectorytrajectory_3d_utm.m colors the trajectory by sequence length; very long trajectories may need a lighter representation.
Runtime box plotboxplot_runtime.m depends on multiple_boxplot_time.m.
MATLAB versionbarplot_gpf_precision.m and tilelayout_pasga.m are intended for R2020a or newer.