Commit 6f76455c authored by Félix Hartmann's avatar Félix Hartmann
Browse files

Matching colors between signals and corresponding thresholds.

parent 28cd47de
......@@ -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, colors[i % nb_signals] + "o")
axis.plot(x, concentrations, color + "o")
else:
axis.plot(x_cell_centers, concentrations, colors[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:
......
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