surface2tikz(fighan​dle,filename,vararg​in)

Embeds a surface plot in 2D view, potentially involving subplots, into a compilable latex-document.
376 Downloads
Updated 4 Nov 2015

View License

This function creates a high-quality rendered picture of a Matlab picture in top view (view(2)) and exports it consistently to the tikz/pgfplots framework, resulting in a .tex file which can be directly imported into your document. Axis labels, titles, etc. are handled by LaTex, i.e. they are vector graphics and have a consistent font setting.
surface2tikz is able to handle either a single plot or a group of plots created by the subplot function in Matlab.
The treatment of general views (removing the restriction of the view(2) command) is still under development and will be incorporated in a future release.

Cite As

Florian Schneider (2024). surface2tikz(fighandle,filename,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/52480-surface2tikz-fighandle-filename-varargin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: export_fig

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.6.0.0

correctly updating the file

1.5.0.0

bugfixes in the axis handling
added more options

1.1.0.0

Slightly changed the title and added a picture

1.0.0.0