Highlights
Follow


Poll is CLOSED

Poll

Why do you save figure (.fig) files?

I rarely/never save .fig files
47%
Continue working on it later
16%
Archive for future reference
23%
Share within my organization
10%
Share outside my organization
2%
Other (please leave a comment)
2%
2097 votes

Adam Danz
Adam Danz on 27 Nov 2023
Thanks for participating in the poll! Your comments have been helpful to understand how you are saved figures.
Martin Lechner
Martin Lechner on 26 Nov 2023
Generally, I try to store the results of my data analysis jobs in a structured and reusable form in Matlab files. In these files I try to store these data in Matlab native data types (like structs, arrays, tables, ...).
For the visualization I create functions that creates the visualization based on these data structures. Therefore, I don't need to store Matlab figures because they can be reconstructed quickly. For improving my visualization, I only must tweak my visualization functions.
For sharing my results, I typically use graphics files like (pdf, svg, png or jpeg). But I would prefer to share more interactive results in a vendor neutral format like it's done in plotly (Plotly Open Source Graphing Libraries). In this case I can share results to colleagues who are not using Matlab in a very user-friendly form.
I am very dissatisfied with the Matlab implementation of the data analysis functions (histogram, boxplot, Rainflow counting and spectral analysis). I therefore had to implement these functions myself. For each of these analysis functions I have a class that implements methods for scaling, shifting, weighting, combining and visualization. These objects can be easily saved and loaded. It is therefore not necessary to save Matlab Figures.
Matlab has a non-transparent user interface for these analysis functions. A negative example is the histogram function: If I use the histogram function with outputs, I get the results but then I must create my visualization with basic Matlab plot functions. If I use histogram to create the visualization, then all my samples (typically millions to billions of data points) are included in the figure which increases the size of the figure file (e.g. 100 million data points creates a file size of 1.44GB). Nevertheless, it’s not possible to scale the data or combine different results.
From my point of view the demand to store figures comes from the bad design of MATLAB’s basic data analysis functions. Matlab should encourage user to separate data and analysis results from visualization code. First, in their own functions. To share results vendor neutral interactive html graphics like it’s produced by plotly would be the best.
Stephen Lucas
Stephen Lucas on 20 Nov 2023
For figures that will eventually go in a report of some kind, I like to save one PDF or SVG version (for use in the document) and one copy of the .fig. With that, it's easy to make edits to the figure appearance to match formats, address editor requests, etc., without having to rerun the whole code. With smaller datasets, rerunning the code can be fine, but for bigger ones, it can be time consuming for small edits.
Mohamed Mounir
Mohamed Mounir on 15 Nov 2023
Fig file is one of the importnat tools in Matlab. One can run many separated scripts independentelly and collect their results on one Fig file.
madhan ravi
madhan ravi on 7 Nov 2023 (Edited on 7 Nov 2023)

I save fig files when there are multiple signals on the figure and it would be harder to analyse them when it is as pdf or an image file and if they are very close to one another.

Chris
Chris on 7 Nov 2023
I save fig files if I want to annotate data in more than one way, or show a complex diagram being built up in stages. I don't want to have to recalculate every step for each annotation.
Haynes
Haynes on 6 Nov 2023
I only save as .svg for school lab reports
Matt
Matt on 31 Oct 2023
I tend to only safe .fig files if I have a unique sort of figure that involved manual property editing. Otherwise, I'll just script the format as needed and directly save as a vector file. With that being said, I can only recall having that .fig coming in handy once or twice so rarely would bother these days.
Sydney Lang
Sydney Lang on 30 Oct 2023
I always alwasy always save a .fig along with a viewable format. I make figures primarily to present design results and probably 30% of figures I have to go back and edit (label, add a notation). Epecially when dealing with complicated derived data based off of GBs of information that I can't trivially just 'run again'; its essential for me to be able to go back an manipulate a figure directly and quickly.
Christian Schröder
Christian Schröder on 27 Oct 2023
I very rarely do (and chose that option), but when I do it's for archival purposes. Most of the time exporting to (vector) PDFs is enough, since that's the most convenient format for including figures in presentations etc.
That said, it's great that MATLAB has the ability to save fig files, and I wouldn't want to miss it!
Walter Roberson
Walter Roberson on 26 Oct 2023
If I save a .fig file, I am probably about to use it to demonstrate a point to someone on Answers.
Unless, that is, I saved the .fig file to use as input to my fig-file-debugger (which has not at all caught up with uifigure and related consequence.s)
LInda
LInda on 25 Oct 2023
It is an excellent way to save for later editing, annotations, etc. and export to graphics applications for additional editing.
goc3
goc3 on 25 Oct 2023
I always create figures programmatically, whether it be via a script, function, or app. Even if I play around in the property inspector, I copy the modified code into a file for later use. Accordingly, I can always reproduce it easily.
Image Analyst
Image Analyst on 25 Oct 2023 (Edited on 9 Dec 2023)
I only save them if I need to post a screenshot while replying to someone in the Answers forum (outside my organization).
Benjamin Kraus
Benjamin Kraus on 25 Oct 2023
@Image Analyst: Do you use FIG-files for that? Or do you export to something else (like a PNG)?
Image Analyst
Image Analyst on 9 Dec 2023
@Benjamin Kraus I save the file as a PNG format image file rather than as a MATLAB format .FIG file. That way they can be seen immediately right in the web browser, rather than having to download a .fig file and switch over to MATLAB to see it.

See Also

Tags

No tags entered yet.