Skip to content

Commit

Permalink
fix: cloud radius scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
StolkArjen committed Nov 18, 2022
1 parent 45cdfa4 commit 93e6bf8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plotting/ft_plot_cloud.m
Expand Up @@ -317,8 +317,7 @@ function ft_plot_cloud(pos, val, varargin)
cmid = size(cmapsc,1)/2; % colorbar middle
colscf = 2*( (val-clim(1)) / (clim(2)-clim(1)) )-1; % color between -1 and 1, bottom vs. top colorbar
colscf(colscf>1)=1; colscf(colscf<-1)=-1; % clip values outside the [-1 1] range
radscf = val-(min(abs(val)) * sign(max(val))); % radius between 0 and 1, small vs. large pos/neg effect
radscf = abs( radscf / max(abs(radscf)) );
radscf = abs(colscf); % radius between 0 and 1, small vs. large pos/neg effect

if strcmp(scalerad, 'yes')
rmax = rmin+(radius-rmin)*radscf; % maximum radius of the clouds
Expand Down

0 comments on commit 93e6bf8

Please sign in to comment.