Open .fig files for editing without having MatLab

15 views (last 30 days)
I have a code that creates plots and save each plot as both a .fig file and a .jpg file. I then created a standalone desktop app that others can use to do some batch processing of data into graphs.
Is there a way they can open the .fig files with only having Runtime installed and not a full version of MatLab in case they need to make some changes to the plot (i.e. lines colors, sizes, etc.)?

Answers (2)

Walter Roberson
Walter Roberson on 7 Dec 2022
The interactive edit tools such as Property Inspector are not available in compiled executables.
You could write your own code that permitted them to manipulate the properties -- doing findobj() and injecting selection callbacks and similar. It might be a bit tedious.
Tyler on 8 Dec 2022
Oh I got you!
Yeah it would be nice to have a little functionality for users of built code. Just some simple things like the ability to change colors or toggle lines off and on of a saved .fig plot. Little things like that would make MatLab more appealing to smaller companies and make them not seem quite as money hungry.

Sign in to comment.

Rik on 8 Dec 2022
You could try using GNU Octave to modify the fig file.
There are many downsides to using Octave instead of Matlab (I'm still planning to make a thread with a list some day), but for most cases it is free to use.
Not all code will work, and the apearance is a bit different, but usually simple things are plug and play. If a piece of code works in R2007b and in R2022b, you have almost 100% chance it will work in Octave.
Rik on 9 Dec 2022
You can get my readfile function from the file exchange (I make sure all my submissions are compatible with Octave). It will automatically handle UTF-8 rich text if present and give you a cellstr (similar to how readlines will give you a string vector). I suspect you want to keep the header line and remove the following 6 lines, which is easy to do with indexing.
You're reading your data as a table. That specific data type doesn't exist in Octave (yet?), so you will have to use an alternative method to read your csv file. Luckily the dlmread function is implemented (and the csvread function, should you prefer it. You will have to change your code to use normal arrays instead.
You should also note that the Name=Value syntax is not supported in Octave (yet). This is a very recent addition in Matlab, so that isn't unexpected. You should also note that in Octave there isn't a difference between using double or single quotes, as they both produce char vectors. In Matlab a double quote will produce a string scalar.

Sign in to comment.


Find more on Visual Exploration in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!