Skip to content
Snippets Groups Projects
Commit d7f5a8e5 authored by Jean-Yves TINEVEZ's avatar Jean-Yves TINEVEZ
Browse files

Adapt ellipse thickness to the number of cells to plot.

parent 744748ea
No related branches found
No related tags found
1 merge request!9Rework the whole code for the upcoming publication.
...@@ -9,6 +9,8 @@ function hts = add_ellipse_variable( obj, values, cmap, ax ) ...@@ -9,6 +9,8 @@ function hts = add_ellipse_variable( obj, values, cmap, ax )
maxv = max( values ); maxv = max( values );
colors = colormap( cmap ); colors = colormap( cmap );
if n_objects > 1000, lw = 1; else, lw = 2; end
idx = @(v) 1 + round( (v - minv)/(maxv - minv) * ( size( colors, 1 ) - 1 ) ); idx = @(v) 1 + round( (v - minv)/(maxv - minv) * ( size( colors, 1 ) - 1 ) );
for i = 1 : n_objects for i = 1 : n_objects
...@@ -23,7 +25,7 @@ function hts = add_ellipse_variable( obj, values, cmap, ax ) ...@@ -23,7 +25,7 @@ function hts = add_ellipse_variable( obj, values, cmap, ax )
j = idx( val ); j = idx( val );
set( [ h1 h2 ], ... set( [ h1 h2 ], ...
'Color', colors( j, : ), ... 'Color', colors( j, : ), ...
'LineWidth', 2 ) 'LineWidth', lw )
end end
set( ax, 'CLim', [ minv maxv ] ) set( ax, 'CLim', [ minv maxv ] )
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment