Skip to content

Commit d62017c

Browse files
authored
Merge pull request #39 from score-p/feature/performance-monitoring
fix visualization
2 parents 4b9305e + 612b466 commit d62017c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jumper/visualization.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def plot_graph(ax, metric, perfdata, time_indices=None, color=None):
153153
# in multi node case, we have to iterate over the indices (
154154
# time_indices) and not only 0 here
155155
current_index = 0
156-
target_index = -1
156+
target_index = 0
157157
transition_offset = (x_scale[1] - x_scale[0]) / 2
158158
start_offset = 0
159159
last_idx = time_indices[0][-1][0]
@@ -167,7 +167,7 @@ def plot_graph(ax, metric, perfdata, time_indices=None, color=None):
167167
transition_offset = 0
168168
ax.axvspan(
169169
x_scale[current_index] + start_offset,
170-
x_scale[target_index] + transition_offset,
170+
x_scale[min(target_index, len(x_scale)-1)] + transition_offset,
171171
facecolor=color[cell_idx],
172172
alpha=0.3,
173173
)
@@ -177,7 +177,7 @@ def plot_graph(ax, metric, perfdata, time_indices=None, color=None):
177177
+ start_offset
178178
+ (
179179
(
180-
x_scale[target_index]
180+
x_scale[min(target_index, len(x_scale)-1)]
181181
+ transition_offset
182182
- x_scale[current_index]
183183
+ start_offset

0 commit comments

Comments
 (0)