Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
StolkArjen committed Nov 20, 2022
1 parent e7d3cc2 commit 21ef3a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plotting/ft_plot_cloud.m
Expand Up @@ -318,8 +318,8 @@ function ft_plot_cloud(pos, val, varargin)
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))); % 'vdown' representation
radscf = radscf / abs(clim(2)-clim(1)); % radius between 0 and 1, small vs. large pos/neg effect
radscf = abs(val-min(abs(val)) * sign(max(val))); % 'vdown' representation
radscf = 2*( radscf / (clim(2)-clim(1)) ); % radius between 0 and 1, small vs. large pos/neg effect
radscf(radscf>1)=1; radscf(radscf<0)=0; % clip values outside the [0 1] range

if strcmp(scalerad, 'yes')
Expand Down
4 changes: 2 additions & 2 deletions test/test_ft_plot_cloud.m
Expand Up @@ -106,8 +106,8 @@
figure; ft_plot_cloud(pos, val, 'mesh', mesh1, 'slice', '2d', 'nslices', 3);

% increasing minspace should spread the slices out
figure; ft_plot_cloud(pos, val, 'mesh', mesh1, 'slice', '3d', 'nslices', 3, 'minspace', 15);
figure; ft_plot_cloud(pos, val, 'mesh', mesh1, 'slice', '2d', 'nslices', 3, 'minspace', 15);
figure; ft_plot_cloud(pos, val, 'mesh', mesh1, 'slice', '3d', 'nslices', 3, 'minspace', 20);
figure; ft_plot_cloud(pos, val, 'mesh', mesh1, 'slice', '2d', 'nslices', 3, 'minspace', 20);

% test 'slicepos'
figure; ft_plot_cloud(pos, val, 'mesh', mesh1, 'slice', '3d', 'slicepos', 33);
Expand Down

0 comments on commit 21ef3a1

Please sign in to comment.