Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Félix Hartmann
XyDyS
Commits
6f76455c
Commit
6f76455c
authored
Jul 19, 2019
by
Félix Hartmann
Browse files
Matching colors between signals and corresponding thresholds.
parent
28cd47de
Changes
1
Hide whitespace changes
Inline
Side-by-side
plotutils.py
View file @
6f76455c
...
...
@@ -326,10 +326,11 @@ def fill_cell_file_drawing(
if
signal
:
for
i
,
mechanism
in
enumerate
(
cf
.
transport_mechanisms
):
concentrations
=
u
[
i
].
flatten
(
order
=
'F'
)
color
=
colors
[
i
%
nb_signals
]
if
mechanism
==
"uniform diffusion"
:
axis
.
plot
(
x
,
concentrations
,
color
s
[
i
%
nb_signals
]
+
"o"
)
axis
.
plot
(
x
,
concentrations
,
color
+
"o"
)
else
:
axis
.
plot
(
x_cell_centers
,
concentrations
,
color
s
[
i
%
nb_signals
]
+
"o"
)
axis
.
plot
(
x_cell_centers
,
concentrations
,
color
+
"o"
)
if
cell_concentrations
is
not
None
:
conc_operator
=
cf
.
compute_concentration_operator
(
nodes_per_cell
)
cell_conc
=
cf
.
get_cell_concentrations
(
u
,
conc_operator
)
...
...
@@ -337,8 +338,9 @@ def fill_cell_file_drawing(
C
=
cell_conc
[
i
]
axis
.
plot
(
x_cell_centers
,
C
,
colors
[
i
%
nb_signals
]
+
"o"
)
if
threshold_list
is
not
None
:
for
threshold
in
threshold_list
:
threshold_line
=
Line2D
(
xlim
,
(
threshold
,
threshold
),
color
=
'darkviolet'
)
for
i
,
threshold
in
enumerate
(
threshold_list
):
threshold_line
=
Line2D
(
xlim
,
(
threshold
,
threshold
),
color
=
colors
[
i
%
nb_signals
],
linestyle
=
'--'
)
threshold_line
.
set_linewidth
(
2
*
threshold_line
.
get_linewidth
())
axis
.
add_line
(
threshold_line
)
if
strain_rates
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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