-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNottinghamPhageDotPlotParams.m
56 lines (45 loc) · 1.54 KB
/
NottinghamPhageDotPlotParams.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
function NottinghamPhageDotPlotParams(params, paramNames, savePlot, ...
fileBase)
% Creates dot plots of the paramater data supplied
%
% function NottinghamPhageDotPlotParams(params, paramNames, savePlot, ...
% fileBase)
%
% params - the parameters that are to be plotted
% paramNames - names of the parameters
% savePlot - should the plots be saved
% fileBase - the base for the filename to save the plot as
% Version Author Date Affiliation
% 1.00 J K Summers 3/1/18 Kreft Lab - School of Biosciences -
% University of Birmingham
%
for i = 1:size(params, 2)
fig = figure;
for j = 1:size(params, 3)
xVals = repmat(j, size(params, 1));
yVals = params(:, i, j);
hold on
plot(xVals, yVals, 'b.');
end
% axis square;
ax = gca; % current axes
ax.FontSize = 22;
ax.LineWidth = 1.2;
ax.TickDir = 'out';
ax.TickLength = [0.02 0.02];
ax.YLabel.String = 'Log parameter value';
title({paramNames{i}, ''}, 'FontSize', 22);
if savePlot
% Save the figure
fig.PaperUnits = 'centimeter';
fig.PaperPosition = [2 2 17 17];
fig.PaperPositionMode = 'manual';
figFileName =[fileBase paramNames{i} '.pdf'];
print(fig, figFileName, '-dpdf', '-r600')
figFileName =[fileBase paramNames{i} '.fig'];
savefig(fig, figFileName)
figFileName =[fileBase paramNames{i} '.png'];
print(fig, figFileName, '-dpng', '-r600')
end
end
end