PlotData - display plot raw-data in data-tables
无许可证
Syntax:
plotdata;
plotdata(hPlotFig);
plotdata(figureName,sheetName,xdata,ydata, xAxisName,yHeaders,...);
[hDataFig, hSpreadsheet] = plotdata(...);
PLOTDATA(hPlotFig) scans the supplied figure handle for any plot axes; for each plot axes found, a new spreadsheet is created with the plot data values (X & Y, not Z). The data is displayed in the color of the plot's original color. If the plot lines have a tag name or DisplayName property (also used by legend), these are used as data column headers. Note that all data vectors (xdata, ydata) must be the same length (this limitation will be removed in a future version). If the plot or subplot(s) have titles, these are used as sheet names. Data stats may be turned on/off using the checkbox at the bottom.
Data may be sorted, filtered, modified and exported to Excel - explore the many options available in the top toolbar!
If the Excel plug-in is unavailable (e.g., on Linux), then tab-based Java tables are used.
PLOTDATA() is equivalent to PLOTDATA(gcf), scanning the currently active figure.
PLOTDATA(figureName, sheetName,xdata,ydata,xAxisName,yHeaders, ...) enables direct data display. Parameters #2-6 may be repeated: each set (5 parameters each) will create a separate spreadsheet.
hDataFig = PLOTDATA(...) returns a handle to the data (spreadsheet) figure
[hDataFig, hSpreadsheet] = PLOTDATA(...) also returns a handle to the spreadsheet object - either an Excel ActiveX, or a Java tabbed-pane.
Examples:
>> x=0:.01:10; ydata=[sin(x);cos(x)];
>> hFig=figure; plot([x;x]',ydata');
>> plotdata; % scan the current figure for raw data (2 data lines)
>> plotdata(hFig); % scan the selected figure handle
>> plotdata('title','sheet #1',1:3,magic(3),'Xdata',{'1','2','3'});
Known issues/limitations:
1. Works best with Excel Web Component. This is available on any PC that has Excel installed, or can be downloaded for free from microsoft.com and used (read-only) even if Excel is not installed!
2. If the Excel plug-in is unavailable (e.g., on Linux), tab-based Java tables are used but these provide more limited functionality and have minor resizing issues.
3. Requires all plot lines in an axis to have the same xdata. This limitation will be removed in a future version of PlotData.
4. Works on Matlab 7+. Might work on Matlab 6.5. Fails on Matlab 6.0
Bugs and suggestions:
Please send to Yair Altman (altmany at gmail dot com)
引用格式
Yair Altman (2024). PlotData - display plot raw-data in data-tables (https://www.mathworks.com/matlabcentral/fileexchange/15372-plotdata-display-plot-raw-data-in-data-tables), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- MATLAB > Graphics > 2-D and 3-D Plots >
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > Spreadsheets >
- MATLAB > Language Fundamentals > Data Types > Tables >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0.0 | Added hSpreadsheet return arg; used Java tables if Excel is unavailable |