How to plot like a movie this 30 heatmaps
18 views (last 30 days)
Show older comments
I have 30 heatmaps subplots, how could I present this subplots like an animation or like a movie? (Just one heatmap each 0.5 second)
The subplots are obtained with the following code
var = {'GeneX','GeneY','GeneZ'};
syms x y z S
alpha_x = 3.9e-2;
beta_x = 6.1;
z_x = 1.3e-5;
n_zx = 2.32;
alpha_y= 4.3e-2;
beta_y = 5.7;
x_y = 7.9e-4;
n_xy = n_zx;
delta_y = 1.05;
x_z = 12e-2;
n_xz = n_zx;
y_z = 11e-3;
n_yz = n_zx;
delta_z = 0.2;
ACDC_X = (alpha_x+beta_x*S)/(1+S+(z/z_x)^n_zx)-x;
ACDC_Y = (alpha_y+beta_y*S)/(1+S+(x/x_y)^n_xy)-delta_y*y;
ACDC_Z = 1/(1+(x/x_z)^n_xz+(y/y_z)^n_yz)-delta_z*z;
ACDCsys_div = [ ACDC_X, ACDC_Y, ACDC_Z ];
J = jacobian(ACDCsys_div,[x;y;z]);
Jsolnew(x,y,z,S) = [J];
%%Construcction of the coordinates as a matrix
A=rand(4,300);% import data from directory
a2=A;% coordinates of the equilibrium point.
numofGraphs=30
bx=length(a2(1,1:numofGraphs))
% %kk is the value of ss
% %JacACDC(:,:,kk) = Jsol(a2(:,1),a2(:,2),a2(:,3),10^Jac_logS(a2(:,4)));
%% import code from ali to plot the jacobian
figure;
hmapax = ceil(sqrt(bx)); %???
for kk = 1:bx %bnx %All bin windows = iteration
%Jac_logS(kk) = logS(round(bin*(kk-0.5)));??
JacACDCnew(:,:,kk) = Jsolnew(a2(1,kk),a2(2,kk),a2(3,kk),a2(4,kk));
%voy aqui debo empezar a ver que pasa cone l grafico
%JacACDC(:,:,kk) = Jsol(binX(kk,1),binX(kk,2),binX(kk,3),10^Jac_logS(kk));
ACDC_HmapJnew = double(JacACDCnew(:,:,kk));
subplot(hmapax,hmapax,kk);%
heatmap(var,var,ACDC_HmapJnew,'ColorScaling','log');
S=a2(4,kk);
title(['Jac','s=',num2str(S)]);
end
I really appreciate any orientation. Thanks in advance
0 Comments
Answers (1)
Image Analyst
on 13 May 2019
See attached demo where I plot some stuff in a series, then construct a movie from the series of plots.
See Also
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!