Skip to content

Commit

Permalink
X and Y input vectors passed to pcolor must be casted to type Double …
Browse files Browse the repository at this point in the history
…to be compatible with Matlab R2016a.
  • Loading branch information
ggalibert committed Nov 22, 2016
1 parent 57eeb57 commit 58f2279
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Graph/TimeSeries/graphTimeSeriesTimeDepth.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
% xPcolor = [time.data(1:end-1) - diff(time.data)/2; time.data(end) - (time.data(end)-time.data(end-1))/2];
% yPcolor = [depth.data(1:end-1) - diff(depth.data)/2; depth.data(end) - (depth.data(end)-depth.data(end-1))/2];

h = pcolor(ax, xPcolor, yPcolor, double(var.data'));
h = pcolor(ax, double(xPcolor), double(yPcolor), double(var.data'));
set(h, 'FaceColor', 'flat', 'EdgeColor', 'none');
cb = colorbar();

Expand Down
2 changes: 1 addition & 1 deletion Graph/TimeSeries/graphTimeSeriesTimeFrequency.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
% xPcolor = [time.data(1:end-1) - diff(time.data)/2; time.data(end) - (time.data(end)-time.data(end-1))/2];
% yPcolor = [freq.data(1:end-1) - diff(freq.data)/2; freq.data(end) - (freq.data(end)-freq.data(end-1))/2];

h = pcolor(ax, xPcolor, yPcolor, double(var.data'));
h = pcolor(ax, double(xPcolor), double(yPcolor), double(var.data'));
set(h, 'FaceColor', 'flat', 'EdgeColor', 'none');
cb = colorbar();

Expand Down
2 changes: 1 addition & 1 deletion Graph/TimeSeries/graphTimeSeriesTimeFrequencyDirection.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
X(i, :) = r*sin(theta(i));
end

h = pcolor(ax, X, Y, double([squeeze(sswvData(iTime, :, :)), sswvData(iTime, :, 1)']')); % we need to repeat the first values at the end
h = pcolor(ax, double(X), double(Y), double([squeeze(sswvData(iTime, :, :)), sswvData(iTime, :, 1)']')); % we need to repeat the first values at the end
axis equal tight
shading flat
set(ax, ...
Expand Down
2 changes: 1 addition & 1 deletion Graph/pcolorMooring2DVar.m
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function pcolorMooring2DVar(sample_data, varName, isQC, saveToFile, exportDir)
dataVar(~iGoodHeight) = [];
dataVar = reshape(dataVar, nGoodTime, nGoodHeight);

hPcolorVar(i) = pcolor(hAxMooringVar, xPcolor, yPcolor, double(dataVar'));
hPcolorVar(i) = pcolor(hAxMooringVar, double(xPcolor), double(yPcolor), double(dataVar'));
set(hPcolorVar(i), 'FaceColor', 'flat', 'EdgeColor', 'none');

% Let's redefine properties after pcolor to make sure grid lines appear
Expand Down

0 comments on commit 58f2279

Please sign in to comment.