Skip to content

Commit

Permalink
Fix empty figure that pops-up when batch processing a deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggalibert committed Sep 21, 2017
1 parent 17f87ee commit e94c0f4
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion Graph/checkMooringPlannedDepths.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ function checkMooringPlannedDepths(sample_data, isQC, saveToFile, exportDir)
xMax = max(xMax);

instrumentDesc = [{'Make Model (nominal depth - instrument SN)'}; instrumentDesc];
hLineVar(1) = line(0, 0, 'Visible', 'off', 'LineStyle', 'none', 'Marker', 'none');

%now plot all the calculated depths on one plot to choose region for comparison:
%plot
Expand Down
1 change: 0 additions & 1 deletion Graph/diagramMooring1DVarAgainstOther.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ function diagramMooring1DVarAgainstOther(sample_data, varName, yAxisVarName, isQ
hScatterVar = nan(lenSampleData + 1, 1);

instrumentDesc{1} = 'Make Model (nominal depth - instrument SN)';
hScatterVar(1) = line(0, 0, 'Visible', 'off', 'LineStyle', 'none', 'Marker', 'none');

% we need to go through every instruments to figure out the CLim properties
% on which the subset plots happen below.
Expand Down
1 change: 0 additions & 1 deletion Graph/diagramMooring2DVarAgainstOther.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ function diagramMooring2DVarAgainstOther(sample_data, varName, yAxisVarName, isQ
hScatterVar = nan(lenSampleData + 1, 1);

instrumentDesc{1} = 'Make Model (nominal depth - instrument SN)';
hScatterVar(1) = line(0, 0, 'Visible', 'off', 'LineStyle', 'none', 'Marker', 'none');

% we need to go through every instruments to figure out the CLim properties
% on which the subset plots happen below.
Expand Down
8 changes: 6 additions & 2 deletions Graph/lineCastVar.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ function lineCastVar(sample_data, varNames, isQC, saveToFile, exportDir)

initiateFigure = true;

backgroundColor = [0.85 0.85 0.85];

lenVarNames = length(varNames);
for k=1:lenVarNames
varName = varNames{k};
Expand Down Expand Up @@ -86,7 +88,6 @@ function lineCastVar(sample_data, varNames, isQC, saveToFile, exportDir)
hLineFlag = ones(4, 1);

instrumentDesc{1} = 'Make Model (instrument SN - cast time)';
hLineVar(1) = line(0, 0, 'Visible', 'off', 'LineStyle', 'none', 'Marker', 'none');

for i=1:lenSampleData
% instrument description
Expand Down Expand Up @@ -145,6 +146,9 @@ function lineCastVar(sample_data, varNames, isQC, saveToFile, exportDir)
set(hAxCastVar, 'YLim', [yMin, yMax]);
hold(hAxCastVar, 'on');

% dummy entry for first entry in legend
hLineVar(1) = plot(0, 0, 'Color', backgroundColor, 'Visible', 'off'); % color grey same as background (invisible)

cMap = colormap(hAxCastVar, parula(lenSampleData));
cMap = flipud(cMap);
end
Expand Down Expand Up @@ -262,7 +266,7 @@ function lineCastVar(sample_data, varNames, isQC, saveToFile, exportDir)
'Layer', 'top');

% set background to be grey
set(hAxCastVar, 'Color', [0.85 0.85 0.85])
set(hAxCastVar, 'Color', backgroundColor)
end
end

Expand Down
1 change: 0 additions & 1 deletion Graph/lineMooring1DVar.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ function lineMooring1DVar(sample_data, varName, isQC, saveToFile, exportDir)
hLineVar = nan(lenSampleData + 1, 1);

instrumentDesc{1} = 'Make Model (nominal depth - instrument SN)';
hLineVar(1) = line(0, 0, 'Visible', 'off', 'LineStyle', 'none', 'Marker', 'none');

initiateFigure = true;
isPlottable = false;
Expand Down
1 change: 0 additions & 1 deletion Graph/scatterMooring1DVarAgainstDepth.m
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ function scatterMooring1DVarAgainstDepth(sample_data, varName, isQC, saveToFile,
hScatterVar = nan(lenSampleData + 1, 1);

instrumentDesc{1} = 'Make Model (nominal depth - instrument SN)';
hScatterVar(1) = line(0, 0, 'Visible', 'off', 'LineStyle', 'none', 'Marker', 'none');

% we need to go through every instruments to figure out the CLim properties
% on which the subset plots happen below.
Expand Down
1 change: 0 additions & 1 deletion Graph/scatterMooring2DVarAgainstDepth.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ function scatterMooring2DVarAgainstDepth(sample_data, varName, isQC, saveToFile,
hScatterVar = nan(lenSampleData + 1, 1);

instrumentDesc{1} = 'Make Model (nominal depth - instrument SN)';
hScatterVar(1) = line(0, 0, 'Visible', 'off', 'LineStyle', 'none', 'Marker', 'none');

% we need to go through every instruments to figure out the CLim properties
% on which the subset plots happen below.
Expand Down

0 comments on commit e94c0f4

Please sign in to comment.