Commit b6ddcbbf authored by Philippe SWARTVAGHER's avatar Philippe SWARTVAGHER
Browse files

CommCompGraph: add markersize attribute and use it in plot_model.py

parent 649c765c
......@@ -782,7 +782,7 @@ class CommCompGraph:
def nb_curves(self):
return self._nb_comm_curves + self._nb_comp_curves
def _add_curve(self, ax, line_values, label, curve_type, use_previous_color, min_values, max_values, display_line):
def _add_curve(self, ax, line_values, label, curve_type, use_previous_color, min_values, max_values, display_line, markersize):
if (min_values is None and max_values is not None) or (min_values is not None and max_values is None):
raise Exception("You have to provide either both min and max values or none.")
......@@ -805,23 +805,23 @@ class CommCompGraph:
else:
curve_style = "."
ax.plot(self._x_range, line_values, curve_style, label=label, color=self._current_color)
ax.plot(self._x_range, line_values, curve_style, label=label, color=self._current_color, markersize=markersize)
if min_values is not None:
assert(max_values is not None)
ax.fill_between(self._x_range, min_values, max_values, linestyle=line_style, color=self._current_color, alpha=self._FILL_ALPHA)
def add_comm_curve(self, line_values, label, curve_type, use_previous_color=False, min_values=None, max_values=None, display_line=True):
self._add_curve(self._ax, line_values, label, curve_type, use_previous_color, min_values, max_values, display_line)
def add_comm_curve(self, line_values, label, curve_type, use_previous_color=False, min_values=None, max_values=None, display_line=True, markersize=plt.rcParams['lines.markersize']):
self._add_curve(self._ax, line_values, label, curve_type, use_previous_color, min_values, max_values, display_line, markersize)
self._nb_comm_curves += 1
self._left_y_max = max(self._left_y_max, max(line_values))
def add_comp_curve(self, line_values, label, curve_type, use_previous_color=False, min_values=None, max_values=None, display_line=True):
def add_comp_curve(self, line_values, label, curve_type, use_previous_color=False, min_values=None, max_values=None, display_line=True, markersize=plt.rcParams['lines.markersize']):
if self._ax_right is None:
self._ax_right = self._ax.twinx()
self._add_curve(self._ax_right, line_values, label, curve_type, use_previous_color, min_values, max_values, display_line)
self._add_curve(self._ax_right, line_values, label, curve_type, use_previous_color, min_values, max_values, display_line, markersize)
self._nb_comp_curves += 1
self._right_y_max = max(self._right_y_max, max(line_values))
......
......@@ -83,6 +83,8 @@ comm_errors_sample = []
comp_errors = []
comp_errors_sample = []
MARKER_SIZE = 9
for numa_comp in range(topo.nb_numa_nodes_total):
graphs.append([])
for numa_comm in range(topo.nb_numa_nodes_total):
......@@ -127,7 +129,8 @@ for numa_comp in range(topo.nb_numa_nodes_total):
False,
[parser.comm_bw_alone_results[x]['d1'] for x in real_x_values],
comm_alone_upper_values,
display_line=False
display_line=False,
markersize=MARKER_SIZE
)
else:
graph.add_comm_curve(
......@@ -135,7 +138,8 @@ for numa_comp in range(topo.nb_numa_nodes_total):
"alone",
CommCompGraphCurveType.ALONE,
False,
display_line=False
display_line=False,
markersize=MARKER_SIZE
)
max_comm = max(max_comm, parser.comm_bw_with_comp_results[1]['med'])
......@@ -149,7 +153,8 @@ for numa_comp in range(topo.nb_numa_nodes_total):
True,
[parser.comm_bw_with_comp_results[x]['d1'] for x in real_x_values],
comm_with_comp_upper_values,
display_line=False
display_line=False,
markersize=MARKER_SIZE
)
comm_color = graph.last_used_color
......@@ -182,7 +187,8 @@ for numa_comp in range(topo.nb_numa_nodes_total):
False,
[parser.comp_alone_results[op][x][metric]['min'] for x in real_x_values],
comp_alone_upper_values,
display_line=False
display_line=False,
markersize=MARKER_SIZE
)
comp_with_comm_values = [parser.comp_with_comm_results[op][x][metric]['avg'] for x in real_x_values]
......@@ -193,7 +199,8 @@ for numa_comp in range(topo.nb_numa_nodes_total):
True,
[parser.comp_with_comm_results[op][x][metric]['min'] for x in real_x_values],
[parser.comp_with_comm_results[op][x][metric]['max'] for x in real_x_values],
display_line=False
display_line=False,
markersize=MARKER_SIZE
)
comp_color = graph.last_used_color
......
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