-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsystems_plot_sps.m
55 lines (43 loc) · 1.61 KB
/
systems_plot_sps.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
%% make radar plots
clear all; close all;clc
basedir = '/Users/sps253/Documents/energy_landscape';
cd(basedir);
addpath(genpath('code'))
%% set inputs
numClusters = 4;
split='main'
savedir = fullfile(basedir,'results','example');mkdir(savedir); % set save directory
load(fullfile(savedir,['Partition_bp',num2str(split),'_k',num2str(numClusters),'.mat']))
%%
overallNames = clusterNames;
[nparc,numClusters] = size(centroids);
[~,~,~,net7angle] = NAME_CLUSTERS_ANGLE(centroids);
%% plot
YeoColors = [0 0 0;0 0 0;0 0 0;0 0 0;0 0 0;0 0 0;0 0 0;];
YeoColors = [YeoColors;YeoColors];
[~,~,net7angle_Up,net7angle_Down] = NAME_CLUSTERS_UP_DOWN(centroids);
YeoNetNames = {'VIS', 'SOM', 'DAT', 'VAT', 'LIM', 'FPN', 'DMN'};
numNets = numel(YeoNetNames);
%% make radial plots
clusterColors = GET_CLUSTER_COLORS(numClusters);
clusterColors = hex2rgb(clusterColors);
netAngle = linspace(0,2*pi,numNets+1);
thetaNames = YeoNetNames; thetaNames{8} = '';
f=figure;
for K = 1:numClusters
ax = subplot(1,numClusters,K,polaraxes); hold on
polarplot(netAngle,[net7angle_Up(K,:) net7angle_Up(K,1)],'k');
polarplot(netAngle,[net7angle_Down(K,:) net7angle_Down(K,1)],'r');
thetaticks(rad2deg(netAngle)); thetaticklabels(thetaNames);
rlim([0.0 0.7]);
rticks([0.2 0.4 0.8]); rticklabels({'','0.4','0.8'});
for L = 1:numNets
ax.ThetaTickLabel{L} = sprintf('\\color[rgb]{%f,%f,%f}%s', ...
YeoColors(L,:), ax.ThetaTickLabel{L});
end
set(ax,'FontSize',10);
title(overallNames{K},'Color',clusterColors(K,:),'FontSize',12);
end
f.PaperUnits = 'inches';
f.PaperSize = [8 1.5];
f.PaperPosition = [0 0 8 1.5];