source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/graph_results.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 1.2 KB
Line 
1function o = graph_results(ifile, means, stds, ylabs,logscale)
2% This will take two matrices with means and Standard deviations.
3% We assume each row will be a single graph.
4padpercent = .1;
5% I'm going to pad the max and min values that I want visible in
6% the graph by this percent, so they don't touch the top and bottom.
7if logscale
8   if ~isempty(stds)
9      stds_low = log(means - stds);
10      stds_hi = log(means + stds);
11   end
12  means = log(means);
13  ylabs = log(ylabs);
14else
15   if ~isempty(stds)
16      stds_low = means - stds;
17      stds_hi = means + stds;
18   end
19end
20
21if isempty(stds)
22   minval = min(min(ylabs),min(min(means)));
23   maxval = max(max(means));
24else
25   minval = min(min(stds_low));
26   maxval = max(max(stds_hi));
27end
28range = maxval - minval;
29
30padded_minval = max(0,minval - padpercent*range);
31padded_maxval = maxval + padpercent*range;
32
33for i = 1:size(means,1)
34   mean_row = means(i,:);
35   if ~isempty(stds)
36      std_low_row = stds_low(i,:);
37      std_hi_row = stds_hi(i,:);
38   else
39      std_low_row = [];
40      std_hi_row = [];
41      end
42  graph_idraw(ifile, mean_row, std_low_row, std_hi_row, padded_minval, padded_maxval);
43end
44
45label_graph(ifile, 1:size(means,2), 0, 1 + size(means,2), ylabs, padded_minval, padded_maxval);
46o=1;
Note: See TracBrowser for help on using the repository browser.