From f460356e6db46e1e58b7b0ae64966533ef1e38fe Mon Sep 17 00:00:00 2001
From: Oscar Gustafsson <oscar.gustafsson@gmail.com>
Date: Thu, 28 May 2020 17:39:43 +0200
Subject: [PATCH] Only use integer xticks in schedule

---
 b_asic/schema.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/b_asic/schema.py b/b_asic/schema.py
index 3fd66f58..378e9dfc 100644
--- a/b_asic/schema.py
+++ b/b_asic/schema.py
@@ -6,6 +6,7 @@ Contains the schema class for scheduling operations in an SFG.
 from collections import defaultdict
 from typing import Dict, List, Optional
 import matplotlib.pyplot as plt
+from matplotlib.ticker import MaxNLocator
 import numpy as np
 from scipy import interpolate
 import sys
@@ -247,6 +248,7 @@ class Schema:
 
         plt.yticks(ytickpositions, yticklabels)
         plt.axis([-1, self._schedule_time+1, 0, ypos])
+        plt.gca().xaxis.set_major_locator(MaxNLocator(integer=True))
         plt.plot([0, 0], [0, ypos], linestyle='--', color='black')
         plt.plot([self._schedule_time, self._schedule_time], [0, ypos], linestyle='--', color='black')
         plt.show()
-- 
GitLab