Commit 7fb58e6c authored by Félix Hartmann's avatar Félix Hartmann
Browse files

Cell tangential diameter can be given as a parameter when plotting cell

file.
parent 3c98ea6a
......@@ -227,6 +227,7 @@ def fill_cell_file_drawing(
strain_rates=None,
colored_zones=False,
cell_indices=False,
tangential_diameter=None,
date=False,
colors=['b', 'r', 'g', 'm', 'c'],
linewidth=1,
......@@ -252,7 +253,10 @@ def fill_cell_file_drawing(
nb_cells, nb_signals = len(D), len(u)
rectangle_positions = D.cumsum() - D
x_cell_centers = rectangle_positions + D/2
t_diameter = 2 * cf.concentration_scale()
if tangential_diameter is None:
t_diameter = 2 * cf.concentration_scale()
else:
t_diameter = tangential_diameter
# Cells are drawn as rectangles.
rects = []
for i, r_diameter in enumerate(D):
......@@ -375,6 +379,7 @@ def draw_cell_file(
strain_rates=False,
colored_zones=True,
cell_indices=False,
tangential_diameter=None,
date=False,
colors=['b', 'r', 'g', 'm', 'c'],
linewidth=1,
......@@ -422,6 +427,9 @@ def draw_cell_file(
belong to.
cell_indices : Boolean, optional, default: False
If True, the index of each cell is displayed on it.
tangential_diameter : float, optional, default: None
Tangential diameter of the cells, only for representation purpose.
If None, set automatically.
date : Boolean, optional, default: False
If True, writes current date on the plot.
colors : list of colors, optional, default: ['b', 'r', 'g', 'm', 'c']
......@@ -495,6 +503,7 @@ def draw_cell_file(
threshold_list=threshold_list,
colored_zones=colored_zones,
cell_indices=cell_indices,
tangential_diameter=tangential_diameter,
strain_rates=S,
date=date,
colors=colors,
......
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