Code covered by the BSD License  

Highlights from

5.0 | 9 ratings Rate this file 25 Downloads (last 30 days) File Size: 429 KB File ID: #42279 Version: 1.1
image thumbnail



Oleg Komarov (view profile)


18 Jun 2013 (Updated )

Plot correlation matrix as a schemaball

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information

Plots correlation matrix as a schemaball.


- Base demo

- Supply your own correlation matrix (only lower off-diagonal triangular part is considered)
x = rand(10).^3;
x(:,3) = 1.3*mean(x,2);

- Supply custom labels as ['aa'; 'bb'; 'cc'; ...] or {'Hi','how','are',...}
schemaball(x, repmat(('a':'j')',1,2))
schemaball(x, {'Hi','how','is','your','day?', 'Do','you','like','schemaballs?','NO!!'})

- Customize curve colors
schemaball([],[],[1,0,1;1 1 0])

- Customize node color

- Customize manually other aspects
h = schemaball;
set(h.l(~isnan(h.l)), 'LineWidth',1.2)
set(h.s, 'MarkerEdgeColor','red','LineWidth',2,'SizeData',100)
set(h.t, 'EdgeColor','white','LineWidth',1)

For details see help

- generalize to allow as input any connectivity matrix providing examples, updated documentation (and added functionality?)


Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
21 Jul 2015 Oleg Komarov

Oleg Komarov (view profile)

@cmo I cannot reproduce the issue. Can you provide an example?

@Anca Mitrea You need to save it with optional arguments for higher resolution. Please, see the matlab docs for print() and/or saveas(). You can also try export_fig

Comment only
28 Jun 2015 Anca Mitrea

Awesome tool, love it! I have a question... I would like to print the result on an A0 or A1 paper size and if I simply save it as it is, when I zoom it, it gets pixeled. What should I do? Thank you very much!

19 Jun 2015 cmo

cmo (view profile)

works great!
when I use "saveas", the resulting PNG has a white background.
How do I print it to file with the black background?

02 Jan 2015 Nebitno

Thanks Oleg!

Comment only
02 Jan 2015 Oleg Komarov

Oleg Komarov (view profile)

Hi Nebitno, check out:

Comment only
30 Dec 2014 Nebitno

Silly question: how do I reference a figure that I generated using your code?

26 Dec 2014 Nebitno  
04 Jul 2014 Oleg Komarov

Oleg Komarov (view profile)

You can normalize your matrix. I left this aspect to the user, since she can choose how to re-map the matrix to an arbitrary interval.

Comment only
04 Jul 2014 Pascal Schulthess

Absolutely fantastic.
But, I'd love a way to also input arbitrary matrices with arbitrary value ranges. Is there a way to do that?

01 Jul 2014 amanita  
10 Jan 2014 Wilma

Wilma (view profile)

09 Dec 2013 jun

jun (view profile)


03 Sep 2013 karlo gonzales  
24 Jun 2013 1.1

Added link to fex page in the help.

Contact us