All Projects → matlab2tikz → Matlab2tikz

matlab2tikz / Matlab2tikz

Licence: bsd-2-clause
This program converts MATLAB®/Octave figures to TikZ/pgfplots figures for smooth integration into LaTeX.

Programming Languages

matlab
3953 projects

Projects that are alternatives of or similar to Matlab2tikz

Neural
LATEX: TikZ package for drawing neural networks. Also available on CTAN at http://www.ctan.org/tex-archive/graphics/pgf/contrib/neuralnetwork
Stars: ✭ 169 (-83.77%)
Mutual labels:  latex, tikz
Tikz
Galley of Tikz drawings.
Stars: ✭ 251 (-75.89%)
Mutual labels:  latex, tikz
Sane tikz
Reconquer the canvas: beautiful Tikz figures without clunky Tikz code
Stars: ✭ 196 (-81.17%)
Mutual labels:  latex, tikz
Tikzcd Editor
A simple visual editor for creating commutative diagrams.
Stars: ✭ 1,627 (+56.29%)
Mutual labels:  latex, tikz
Awesome Tikz
A curated list of awesome TikZ documentations, libraries and resources
Stars: ✭ 804 (-22.77%)
Mutual labels:  latex, tikz
Quiver
A modern commutative diagram editor for the web.
Stars: ✭ 1,799 (+72.81%)
Mutual labels:  latex, tikz
Ktikz
KtikZ provides a nice user interface for making pictures using TikZ.
Stars: ✭ 233 (-77.62%)
Mutual labels:  latex, tikz
Circuitikz
CircuiTikZ TeX/LaTeX package for drawing circuits
Stars: ✭ 222 (-78.67%)
Mutual labels:  latex, tikz
Tikz
Complete collection of my PGF/TikZ figures.
Stars: ✭ 668 (-35.83%)
Mutual labels:  latex, tikz
tikz favorites
collection of favorite TikZ graphics
Stars: ✭ 62 (-94.04%)
Mutual labels:  latex, tikz
Tikz Feynman
Feynman Diagrams with TikZ
Stars: ✭ 104 (-90.01%)
Mutual labels:  latex, tikz
Tikz drawings
Drawing in LaTeX
Stars: ✭ 18 (-98.27%)
Mutual labels:  latex, tikz
Tikzplotlib
Convert matplotlib figures to TikZ/PGFplots for smooth integration into LaTeX.
Stars: ✭ 1,338 (+28.53%)
Mutual labels:  latex, tikz
Latex Cheatsheet
Template for a compact LaTeX Cheatsheet I made some years ago.
Stars: ✭ 136 (-86.94%)
Mutual labels:  latex, tikz
lazylatex
Because LaTeX shouldn't be boring! 🐠 LaTeX package inspired by sphinx-rtd-theme. Build with tcolorbox, minted, tikz, etc,.
Stars: ✭ 16 (-98.46%)
Mutual labels:  latex, tikz
Cocalc
CoCalc: Collaborative Calculation in the Cloud
Stars: ✭ 888 (-14.7%)
Mutual labels:  latex, octave
Latex Examples
Examples for the usage of LaTeX
Stars: ✭ 1,032 (-0.86%)
Mutual labels:  latex, tikz
Textplayer
A library to play MML and ABC songs, written in C#
Stars: ✭ 29 (-97.21%)
Mutual labels:  octave
Leadsheets
A LaTeX package for creating leadsheets and songbooks
Stars: ✭ 38 (-96.35%)
Mutual labels:  latex
Russian Phd Latex Dissertation Template
LaTeX-template for russian Phd thesis
Stars: ✭ 946 (-9.13%)
Mutual labels:  latex

The updater in matlab2tikz 0.6.0 (and older) no longer works. Please update manually if you are not using matlab2tikz 1.0.0 or newer!

Build Status DOI matlab2tikz

matlab2tikz is a MATLAB(R) script to convert native MATLAB(R) figures to TikZ/Pgfplots figures that integrate seamlessly in LaTeX documents.

To download the official releases and rate matlab2tikz, please visit its page on FileExchange.

matlab2tikz converts most MATLAB(R) figures, including 2D and 3D plots. For plots constructed with third-party packages, however, your mileage may vary.

Installation

  1. Extract the ZIP file (or clone the git repository) somewhere you can easily reach it.
  2. Add the src/ folder to your path in MATLAB/Octave: e.g.
    • using the "Set Path" dialog in MATLAB, or
    • by running the addpath function from your command window or startup script.

Make sure that your LaTeX installation is up-to-date and includes:

It is recommended to use the latest stable version of these packages. Older versions may work depending on the actual MATLAB(R) figure you are converting.

Usage

Typical usage of matlab2tikz consists of converting your MATLAB plot to a TikZ/LaTeX file and then running a LaTeX compiler to produce your document.

MATLAB

  1. Generate your plot in MATLAB(R).

  2. Run matlab2tikz, e.g. using

matlab2tikz('myfile.tex');

LaTeX

Add the contents of myfile.tex into your LaTeX source code, for example using \input{myfile.tex}. Make sure that the required packages (such as pgfplots) are loaded in the preamble of your document as in the example:

\documentclass{article}

  \usepackage{pgfplots}
  \pgfplotsset{compat=newest}
  %% the following commands are needed for some matlab2tikz features
  \usetikzlibrary{plotmarks}
  \usetikzlibrary{arrows.meta}
  \usepgfplotslibrary{patchplots}
  \usepackage{grffile}
  \usepackage{amsmath}

  %% you may also want the following commands
  %\pgfplotsset{plot coordinates/math parser=false}
  %\newlength\figureheight
  %\newlength\figurewidth

\begin{document}
  \input{myfile.tex}
\end{document}

Remarks

Most functions accept numerous options; you can check them out by inspecting their help:

help matlab2tikz

Sometimes, MATLAB(R) plots contain some features that impede conversion to LaTeX; e.g. points that are far outside of the actual bounding box. You can invoke the cleanfigure function to remove such unwanted entities before calling matlab2tikz:

cleanfigure;
matlab2tikz('myfile.tex');

More information

  • For more information about matlab2tikz, have a look at our GitHub repository. If you are a good MATLAB(R) programmer or LaTeX writer, you are always welcome to help improving matlab2tikz!
  • Some common problems and pit-falls are documented in our wiki.
  • If you experience (other) bugs or would like to request a feature, please visit our issue tracker.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].