Skip to content

Commit

Permalink
Merge pull request #1 from mattools/master
Browse files Browse the repository at this point in the history
merge with mattools version
  • Loading branch information
David Legland committed Aug 8, 2017
2 parents 364ec08 + d365b7f commit 88f96ef
Show file tree
Hide file tree
Showing 177 changed files with 44 additions and 24 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# matStats
Data Analysis Tools for Matlab based on a data table class
Data Exploration and Analysis Toolbox for Matlab based on a data table class

The MatStats package have been relocated to https://github.com/mattools/matStats. Please update your links/bookmarks!
This package contains:
* a "Table" class for processing and exploration of numerical and categorical variables.
The Table class encapsulates data array together with row names, column names, table name.
It also supports factor columns, such as categorical factors ("yes", "no"), and overrides many plot functions.
* Pca and Anova classes that encapsulate algorithms for principal component analysis or analysis of variance,
and provide intuituve methods for exploring and analysing the result while keeping individual or variable names.

A presentation of the library is provided in the [matStats-manual.pdf](https://github.com/mattools/matStats/releases/download/v0.2/matStats-manual.pdf) document.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/@Table/corrcoef.m → matStats/@Table/corrcoef.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
% See also
% std, cov, correlationCircles
%

% ------
% Author: David Legland
% e-mail: david.legland@grignon.inra.fr
% e-mail: [email protected]
% Created: 2012-01-10, using Matlab 7.9.0.529 (R2009b)
% Copyright 2012 INRA - Cepia Software Platform.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
function h = correlationCircles(this, varargin)
%CORRELATIONCIRCLES Represent correlation matrix using colored circles
%
% output = correlationCircles(input)
% correlationCircles(TAB)
% Represents the correlations between all pairs of quantitative variables
% in a data table as a collection of colored circles. Such representation
% may also be known as 'correlogram'.
%
% Red colors correpond to positive correlation, whereas blur colors
% correspond to negative correlations. The size of the circle is also
% related to the intensity of the correlation.
%
% Example
% % Simple example on iris
Expand All @@ -14,11 +21,16 @@
% correlationCircles(tab)
%
% See also
% corrcoef
% corrcoef, plotmatrix
%
% References
% It is inspired by the contribution of Taiyun Wei for R:
% http://weitaiyun.blogspot.fr/2009/04/visulization-of-correlation-matrix2.html
%

% ------
% Author: David Legland
% e-mail: david.legland@grignon.inra.fr
% Author: David Legland, based on plotmatrix code
% e-mail: [email protected]
% Created: 2012-07-16, using Matlab 7.9.0.529 (R2009b)
% Copyright 2012 INRA - Cepia Software Platform.

Expand All @@ -35,18 +47,18 @@

% Create the main axis containing all small axes
cax = gca;
BigAx = newplot(cax);
fig = ancestor(BigAx, 'figure');
holdState = ishold(BigAx);
set(BigAx, ...
refAxis = newplot(cax);
fig = ancestor(refAxis, 'figure');
holdState = ishold(refAxis);
set(refAxis, ...
'Visible', 'off', ...
'xlim', [-1 1], ...
'ylim', [-1 1], ...
'DataAspectRatio', [1 1 1], ...
'PlotBoxAspectRatio', [1 1 1], ...
'color', 'none');

pos = get(BigAx, 'Position');
pos = get(refAxis, 'Position');

% size of sub-plots
width = pos(3) / (nRows+1);
Expand All @@ -56,22 +68,22 @@
space = .02;
pos(1:2) = pos(1:2) + space * [width height];

BigAxHV = get(BigAx, 'HandleVisibility');
BigAxParent = get(BigAx, 'Parent');
BigAxHV = get(refAxis, 'HandleVisibility');
BigAxParent = get(refAxis, 'Parent');

% pre-compute data for drawing circles
t = linspace(0, 2*pi, 100)';
cx = cos(t);
cy = sin(t);

% iterate over all cells
% iterate over all axis cells
for i = nRows:-1:1
for j = nCols:-1:1

% compute the position within the main figure
axPos = [...
pos(1) + (j-1+1) * width ...
pos(2) + (nRows-i-1) * height ...
pos(1) + j * width ...
pos(2) + (nRows-i) * height ...
width * (1-space) ...
height * (1-space)];

Expand Down Expand Up @@ -100,22 +112,22 @@
end
end


% setup labels for x and y axes
set(ax(:), 'xticklabel', '')
set(ax(:), 'yticklabel', '')
set(BigAx, ...
set(refAxis, ...
'userdata', ax, ...
'tag', 'PlotMatrixBigAx');
set(ax, 'tag', 'PlotMatrixCorrelationCirclesAx');

% Make BigAx the CurrentAxes
set(fig, 'CurrentAx', BigAx)
if ~holdState,
% make refAxis the current axis handle
set(fig, 'CurrentAx', refAxis)
if ~holdState
set(fig, 'NextPlot', 'replace')
end

% Also set Title and X/YLabel visibility to 'on' and strings to empty
textHandles = [get(BigAx,'Title'); get(BigAx,'XLabel'); get(BigAx,'YLabel')];
% also set visibility of text widgets to 'on' and strings to empty
textHandles = [get(refAxis, 'Title'); get(refAxis, 'XLabel'); get(refAxis, 'YLabel')];
set(textHandles, 'String', '', 'Visible', 'on')

% display labels on the left and on the top of the circle array
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 88f96ef

Please sign in to comment.