Commit fcf1f9cd authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter
Browse files

fix to display phase correctly if only phase information is given

parent 37b586d9
......@@ -81,8 +81,12 @@ else
isComplex = ~all(isreal(r)) || sArgs.complex;
if isComplex
if sArgs.complex && ~isempty(sArgs.radius)
color = mod(data,2*pi);
% if the radius is complex, set the color
color = mod(angle(r),2*pi);
colorbar_settings = 'complex';
% if it is real, use the magnitude as color
......@@ -92,7 +96,7 @@ else
r = abs(r);
if ~isempty(sArgs.radius)
if ~isempty(sArgs.radius) && ~sArgs.complex
% if a color is given explicitly
% negative radii are set to 0
if sum(abs(imag(r))) > 0, ita_verbose_info('ignoring imaginary part of radius'); end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment