minor gui update

This commit is contained in:
Casper da Costa-Luis 2019-08-26 02:03:33 +01:00
parent 5d373de1da
commit 13406721ae
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
1 changed files with 3 additions and 2 deletions

View File

@ -54,7 +54,8 @@ class tqdm_gui(tqdm): # pragma: no cover
self.mininterval = max(self.mininterval, 0.5) self.mininterval = max(self.mininterval, 0.5)
self.fig, ax = plt.subplots(figsize=(9, 2.2)) self.fig, ax = plt.subplots(figsize=(9, 2.2))
# self.fig.subplots_adjust(bottom=0.2) # self.fig.subplots_adjust(bottom=0.2)
if self.total: total = len(self)
if total is not None:
self.xdata = [] self.xdata = []
self.ydata = [] self.ydata = []
self.zdata = [] self.zdata = []
@ -65,7 +66,7 @@ class tqdm_gui(tqdm): # pragma: no cover
self.line1, = ax.plot(self.xdata, self.ydata, color='b') self.line1, = ax.plot(self.xdata, self.ydata, color='b')
self.line2, = ax.plot(self.xdata, self.zdata, color='k') self.line2, = ax.plot(self.xdata, self.zdata, color='k')
ax.set_ylim(0, 0.001) ax.set_ylim(0, 0.001)
if self.total: if total is not None:
ax.set_xlim(0, 100) ax.set_xlim(0, 100)
ax.set_xlabel('percent') ax.set_xlabel('percent')
self.fig.legend((self.line1, self.line2), ('cur', 'est'), self.fig.legend((self.line1, self.line2), ('cur', 'est'),