Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IAH public
DeProj
Commits
d7f5a8e5
Commit
d7f5a8e5
authored
Jul 26, 2020
by
Jean-Yves TINEVEZ
Browse files
Adapt ellipse thickness to the number of cells to plot.
parent
744748ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/@deproj/add_ellipse_variable.m
View file @
d7f5a8e5
...
...
@@ -9,6 +9,8 @@ function hts = add_ellipse_variable( obj, values, cmap, ax )
maxv
=
max
(
values
);
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment