No BSD License  

Highlights from
PlotData - display plot raw-data in data-tables

5.0

5.0 | 4 ratings Rate this file 16 Downloads (last 30 days) File Size: 37.94 KB File ID: #15372
image thumbnail

PlotData - display plot raw-data in data-tables

by Yair Altman

 

20 Jun 2007 (Updated 25 Jun 2007)

Displays raw data of figure plots in separate spreadsheet tables

| Watch this File

File Information
Description

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)

MATLAB release MATLAB 7.4 (R2007a)
Other requirements Works on Matlab 7+; Might work on Matlab 6.5; Fails on Matlab 6.0
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
10 Apr 2008 Junwoo Lee

This is exactly same thing that I was concern. Excellent job!!!.

08 Nov 2009 Raz Shimoni  
26 May 2010 Dalle Ali

hey it looks and works great! thanks!

12 Sep 2010 Sherif

Excellent work.

Please login to add a comment or rating.
Updates
25 Jun 2007

Added hSpreadsheet return arg; used Java tables if Excel is unavailable

Tag Activity for this File
Tag Applied By Date/Time
data exploration Yair Altman 22 Oct 2008 09:16:39
excel Yair Altman 22 Oct 2008 09:16:39
activex Yair Altman 22 Oct 2008 09:16:39
java Yair Altman 22 Oct 2008 09:16:39
table Yair Altman 22 Oct 2008 09:16:39
tabs Yair Altman 22 Oct 2008 09:16:39

Contact us at files@mathworks.com