Giter VIP home page Giter VIP logo

matlab-figures's Introduction

MATLAB Script to Produce Scientific Figures

This repository contains a MATLAB script to create scientific figures. The script carefully follows data visualization best practices.

Documentation

The script is documented at https://pascalmichaillat.org/d4/.

Features

  • The font on the axes and for the annotations is Helvetica.
  • Font sizes and line thicknesses are set for comfortable reading once the figures are inserted in pairs in a paper.
  • A collection of color palettes is provided, both for qualitative displays and sequential displays. The palettes were created by ColorBrewer.
  • The script produces a collection of basic figures with different plot types and different features:
    • Time series plots: single or multiple series, with or without period areas, with or without above-below areas
    • Scatter plots: transparent or not, connected or not, with or without above-below areas
  • Figure dimensions are set to minimize the white space around the content.
  • The figure aspect ratio is 4:3 so the figure can easily be annotated with a presentation software.
  • The figures produced by the script are available in PDF format in the figures folder.
  • The file figures.pdf illustrates the output of the MATLAB script after annotations.

Usage

  • Clone the repository to your local machine.
  • Open the repository with MATLAB.
  • Run publish('figures.m') in MATLAB to generate an HTML page at html/figures.html in the repository. The page can be opened in any web browser. It displays the MATLAB code and its output. This is the best way to see the figures produced by the script, and to experiment with the script.
  • Use any part of the script 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 annotating the figures directly in MATLAB. The Keynote file figures.key illustrates how to annotate the figures produced by the script. The main step is to insert the image produced by MATLAB as a background to the slide using Image Fill with the option Scale to Fill.
  • The figures.key file can then be exported as a PDF file so the figures can be used elsewhere. The figures.pdf file is obtained by exporting figures.key.

Software

This script was developed on an Apple Silicon Mac with MATLAB R2023B.

License

The content of this repository is licensed under the terms of the MIT License.

matlab-figures's People

Contributors

pmichaillat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.