-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplotdoubgrad.m
More file actions
39 lines (31 loc) · 897 Bytes
/
plotdoubgrad.m
File metadata and controls
39 lines (31 loc) · 897 Bytes
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
function [hf ha] = plotdoubgrad(platedata, varargin)
% PLOTDOUBGRAD plots a heat map of a metric calculated on a double
% gradient. If no metrics are provided, the mean yfp signal of each well is
% plotted. By default, the yfp histograms of each well are also overlaid on
% the heatmap.
%
% Created 20141021 by JW
% parse arguments, set defaults
p = inputParser;
addOptional(p,'metrics',[],@isnumeric);
parse(p,varargin{:});
metrics = p.Results.metrics;
% compute metrics if necessary
if isempty(metrics)
metrics = calcmetricplate(platedata, @meanmetric);
end
% plot heatmap
nplots = size(metrics,3);
[hf ha] = gridplot(nplots,1,400,400);
climits = [];
for iplot = 1:nplots
axes(ha(iplot))
imagesc(flipud(metrics(:,:,iplot)));
colormap(bone);
% standardize color axis
if isempty(climits)
climits = caxis;
else
caxis(climits);
end
end