-
Notifications
You must be signed in to change notification settings - Fork 3
/
plot_pseudotime.m
executable file
·48 lines (38 loc) · 1018 Bytes
/
plot_pseudotime.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
function plot_pseudotime(latent,Cell_dist,folder,figname,method)
%% plot pseudotime on the latent space
cmap = parula;
mymap = cmap(1:round(60*256./64),:);
colormap(mymap);
scatter(latent(:,1),latent(:,2),10,Cell_dist,'filled','MarkerEdgeAlpha',0.6,'MarkerFaceAlpha',0.6);
% axis off;
cb = colorbar;
ax = gca;
axpos = ax.Position;
cpos = cb.Position;
cpos(3) = 0.5*cpos(3);
cb.Position = cpos;
ax.Position = axpos;
% box on;
aa = cell(1,2);
aa{1} = '0';
aa{2} = '1';
cb.TickLabels{1} = aa{1};
cb.TickLabels{end} = aa{2};
for ii = 2:length(cb.TickLabels)-1
cb.TickLabels{ii} = [];
end
xlabel([method num2str(1)]);
ylabel([method num2str(2)]);
set(gca,'FontName','Arial');
set(gca,'FontSize',12);
ax = gca;
ax.TickDir = 'out';
ax.LineWidth = 1.5;
% Set the size of output fig
fig = gcf;
fig.PaperPositionMode = 'auto';
fig_pos = fig.PaperPosition;
fig.PaperSize = [fig_pos(3) fig_pos(4)];
fig.Units = 'Inches';
fig.Position = [0 0 4 3];
% print([folder '\' figname '_' method],'-dpdf','-r300','-bestfit');