Unplot

Version 1.0.0 (1,48 ko) par Derek Wood
Transfer data from a plot into the working environment -- Extracts all data from a given figure axes back into a matlab variable
14 téléchargements
Mise à jour 9 juin 2022

Afficher la licence

An incredibly handy tool that I find myself using all the dang time.
The purpose is to return the data stored in a matlab figure back into the environment as a variable. This is useful especially if you tend to save lots of .fig files-- with this tool you no longer need to grab the original data if you want to replot. Or, if you generate plots via GUI, you can pull the data out in a way that is useful.
Or, if you just have 200 plots open and don't remember exactly which data set you happened to use on that one graph over there, you can still get the data back.
The tool will work with scatter/line plots (2d or 3d), images, bar graphs, and histograms.
Use case:
data = unplot( axis_handle );
If no input is given, it defaults to the active axes in the current figure (gca).
Output is a struct array, with each line/image/etc in the plot being given an entry in the array.
type: 'type of data'
name: 'display name of the data set - matches the plot legend'
X: [1×N double]
Y: [1×N double]
Z: [1×N double]
C: [NxM double]
The TPE field indicates the type of data; 'line', 'image', etc.
The NAME with match the DisplayName property of the plot element.
The X,Y,Z fields all contain the data. For 2d data, Z is an empty array, and for image data, they will return the image scale axis (if any exist, otherwise they will be empty).
the C field contains color, i.e. image data.
If you have multiple lines in the plot, the data will appear in the array in the same order that they appear on the plot legend.

Citation pour cette source

Derek Wood (2026). Unplot (https://fr.mathworks.com/matlabcentral/fileexchange/112905-unplot), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2018b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Tags Ajouter des tags
Version Publié le Notes de version
1.0.0