버전 (205 KB) 작성자: Nico Schlömer
A script to convert MATLAB/Octave into TikZ figures for easy and consistent inclusion into LaTeX.
다운로드 수: 120K
업데이트 날짜: 2023/2/10

편집자 메모: Popular File 2013 2015 2016 2018 2019 2020

This is matlab2tikz, a MATLAB(R) script for converting MATLAB figures into native TikZ/Pgfplots figures.
matlab2tikz supports the conversion of most MATLAB figures, including 2D and 3D plots. For plots constructed with third- party packages, your mileage may vary.
The workflow is as follows.

a. Place the matlab2tikz scripts (contents of src/ folder) in a directory where MATLAB can find it (the current directory, for example). b. Make sure that your LaTeX installation includes the packages

TikZ (aka PGF, >=2.00) and
Pgfplots (>=1.3).
Generate your plot in MATLAB.

Invoke matlab2tikz by
>> matlab2tikz();
>> matlab2tikz('myfile.tex');
The script accepts numerous options; check them out by invoking the help,
>> help matlab2tikz
Sometimes, MATLAB makes it hard to create matching LaTeX plots by keeping invisible objects around or stretches the plots too far beyond the bounding box. Use
>> cleanfigure;
>> matlab2tikz('myfile.tex');
to first clean the figure of unwanted entities, and then convert it to TeX.

Add the contents of `myfile.tex` into your LaTeX source code; a convenient way of doing so is to use `\input{/path/to/myfile.tex}`. Also make sure that at the header of your document the Pgfplots package is included:
% and optionally (as of Pgfplots 1.3):
\pgfplotsset{plot coordinates/math parser=false}
There are reported incompatibilities with the following LaTeX packages:

signalflowdiagram (Check out
If you experience bugs, have nice examples of what matlab2tikz can do, or if you are just looking for more information, please visit the web page of matlab2tikz

인용 양식

Nico Schlömer (2024). matlab2tikz/matlab2tikz (, GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
Help CenterMATLAB Answers에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보

update description

update GitHub repository

present the contribution link more prominently

add GitHub link

update to 0.4.7

update to 0.4.6

update to 0.4.5

update to 0.4.4

update to 0.4.3

updated logo

update to 0.4.2

update to 0.4.1

update to 0.4.0

update to 0.3.3

upgrade to 0.3.2 (for real this time)

update to 0.3.0

the largest update in m2t history; for details, see

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.