Skip to content

A very simple .m file to read a .fig file and plot it in Octave.

Notifications You must be signed in to change notification settings

rsnape/OpenMatlabFigureInOctave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

OpenMatlabFigureInOctave

A very simple .m file to read a .fig file and plot it in Octave.

This file was recovered from a deleted Stack Overflow post, referenced in a LaTeX forum here. This code in turn was based on another file which is no longer available on the internet but is reproduced here. The original page is here on the internet archive, but the original .m file was not archived.

The original authors are acknowledged in the header comment.

Functionality

Unpacks the struct that is stored in the .fig file (which is a specialisation of the .mat format). Detects lines, scatter plots, surface plots within the struct as well as textual elements.

Quote from the author who expanded the original:

an expanded version I built based on Cibby's code above. This one includes features such as subplots, markers and marker sizes, scatter plots, text, patches, surfaces, and legends:

Usage

fname = "/path/to/my/figure.fig"
OpenMatlabFigureInOctave(fname)

Contributions

Contributions are welcome - just send in a pull request.

Alternatives

You might want to extract the data and plot in another language / save in a different format. There are instructions for unpacking using Python on this Stack Overflow answer

About

A very simple .m file to read a .fig file and plot it in Octave.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages