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
......@@ -10,6 +10,8 @@ function hts = add_ellipse_variable( obj, values, cmap, ax )
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 ) );
for i = 1 : n_objects
......@@ -23,7 +25,7 @@ function hts = add_ellipse_variable( obj, values, cmap, ax )
j = idx( val );
set( [ h1 h2 ], ...
'Color', colors( j, : ), ...
'LineWidth', 2 )
'LineWidth', lw )
end
set( ax, 'CLim', [ minv maxv ] )
end
Markdown is supported
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