https://github.com/krproject-tech/fig2data_matlab
Extract data from the figure file of MATLAB ("*.fig").
https://github.com/krproject-tech/fig2data_matlab
figure matlab
Last synced: 9 months ago
JSON representation
Extract data from the figure file of MATLAB ("*.fig").
- Host: GitHub
- URL: https://github.com/krproject-tech/fig2data_matlab
- Owner: KRproject-tech
- License: mit
- Created: 2022-10-10T04:07:49.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-22T09:57:57.000Z (over 1 year ago)
- Last Synced: 2025-02-01T05:41:56.555Z (11 months ago)
- Topics: figure, matlab
- Language: MATLAB
- Homepage:
- Size: 127 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Communication**
**Language**
# fig2data_MATLAB
Extract data from the figure file of MATLAB ("*.fig").
"legend" must be eliminated from the figure to load data by fig2data.
## Usage
```python
out = fig2data( fig_name, Name);
```
where __Name__ is the properties for obtained lines or surfaces.
__[2D case]__
```python
out = fig2data( fig_name, 'LineWidth', 'Color');
xdata = out.xdata;
ydata = out.ydata;
linewidth = out.LineWidth;
color = out.Color;
```
__[3D case]__
```python
out = fig2data( fig_name, 'LineWidth', 'Color');
xdata2 = out.xdata;
ydata2 = out.ydata;
zdata2 = out.zdata;
linewidth = out.LineWidth;
color = out.Color;
```
where
__xdata__ : XData for the figure file.
__ydata__ : YData for the figure file.
__zdata__ : ZData for the figure file.
__fig_name__ : path to the figure file.
## Demo
"demo.m" load the data from figure files in "./load/" directory, and plot these data.

__2D case__

__3D case__