Commit 229f4637 authored by Philippe SWARTVAGHER's avatar Philippe SWARTVAGHER
Browse files

CommCompGraph: force integer x labels if they represent number of threads

parent 1b99bb2b
......@@ -2,6 +2,7 @@ import abc
from enum import Enum
import math
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
import re
from plot_base import byte_formatter, byte_formatter_func, get_comm_durations, compute_stats
......@@ -680,6 +681,9 @@ class CommCompGraph:
self._ax.xaxis.set_major_formatter(byte_formatter)
elif self._x_type == "cursor":
self._ax.set_xlim(left=self._x_range[0])
elif self._x_type == "thread":
# Force integers as X-axis labels:
self._ax.xaxis.set_major_locator(MaxNLocator(integer=True))
if self.x_start is not None:
......
Supports Markdown
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