This repository contains a MATLAB template to create scientific figures. The template carefully follows best practices for data visualization.
The template is documented at https://pascalmichaillat.org/d/.
The figures produced by the template can be viewed at https://pascalmichaillat.org/d.pdf.
- Clone the repository to your local machine.
- Open MATLAB and set the repository as the current folder.
- Run
publish('figures.m')
in MATLAB to generate an HTML page athtml/figures.html
. The page can be opened in any web browser. It displays the MATLAB code and its output. This is a good way to see the figures produced by the template, and to experiment. - Use any part of the template defined in
figures.m
to produce figures for your project. - On a Mac, the figures can easily be annotated with Keynote. This procedure is more user-friendly and more flexible than directly annotating the figures in MATLAB. The Keynote file
figures.key
illustrates how to annotate the figures. The main step is to insert the image produced by MATLAB as a background to the slide usingImage Fill
with the optionScale to Fill
. - The
figures.key
file can then be exported as a PDF file so the figures can be used elsewhere. Thefigures.pdf
file is obtained by exportingfigures.key
.
- The template was developed using MATLAB R2023B on macOS Sonoma (Apple silicon).
- Other MATLAB releases and operating systems may require minor adjustments. Please report any issues to help improve compatibility.
This repository is licensed under the MIT License.