17 Data Visualization with R ggplot2 vs. Matlab

Yuxin Lin

Matlab is a popular programming language in the area of mathematical computation such as calculus, linear algebra, and matrix manipulation.[1] Also, similar to R, Matlab is a powerful tool for data analytics, machine learning, and data visualization. However, because of its common application domain, most tutorials for plotting with Matlab only introduce how to deal with simple simulated array inputs rather than the data set files.

Motivated by an assignment on analyzing auditory fMRI data with Matlab in an applied machine learning course, the cheatsheet is created for beginners of Matlab programming. The cheat sheet provides codes for plotting graphs that are highly frequently used in the process of data exploration and results visualization, in the language of both R with package ggplot2 and Matlab. Although codes of plotting with Matlab appears very trivial, it should be noted that Matlab differs from R and other programming language in some functions, like the use of histograms and bar plots. Through the side-by-side contrast, the cheat sheet is expected to help people who have experience in R but are not familiar with Matlab plotting have a smooth start.

Link: https://github.com/linlinlin-yx/R-ggplot2-vs-Matlab-Plot/blob/main/r_vs_matlab.pdf