Skip to content
Snippets Groups Projects
Commit a1cc00a0 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Applied python formatting script

parent 54b18e70
No related branches found
No related tags found
2 merge requests!1715Update planetary strength after planetary plus's master rebase,!1693More threapool plotting tweaks
......@@ -473,12 +473,14 @@ class Container:
tocs = self.ltocs[thread]
labels = self.llabels[thread]
for i in range(len(tics)):
if ((tics[i] > xlow and tics[i] < xhigh) or
(tocs[i] > xlow and tocs[i] < xhigh)):
if (tics[i] > xlow and tics[i] < xhigh) or (
tocs[i] > xlow and tocs[i] < xhigh
):
tic = "{0:.3f}".format(tics[i])
toc = "{0:.3f}".format(tocs[i])
dumps[tics[i]] = (labels[i] + ", tic/toc = "
+ tic + " / " + toc)
dumps[tics[i]] = (
labels[i] + ", tic/toc = " + tic + " / " + toc
)
print("")
print("Tasks in time range: " + str(xlow) + " -> " + str(xhigh))
for key in sorted(dumps):
......
......@@ -293,6 +293,7 @@ loc = plticker.MultipleLocator(base=1)
ax.yaxis.set_major_locator(loc)
ax.grid(True, which="major", axis="y", linestyle="-")
class Container:
def __init__(self, window, figure, motion, nthread, ltics, ltocs, llabels):
self.window = window
......@@ -341,12 +342,14 @@ class Container:
tocs = self.ltocs[thread]
labels = self.llabels[thread]
for i in range(len(tics)):
if ((tics[i] > xlow and tics[i] < xhigh) or
(tocs[i] > xlow and tocs[i] < xhigh)):
if (tics[i] > xlow and tics[i] < xhigh) or (
tocs[i] > xlow and tocs[i] < xhigh
):
tic = "{0:.3f}".format(tics[i])
toc = "{0:.3f}".format(tocs[i])
dumps[tics[i]] = (labels[i] + ", tic/toc = "
+ tic + " / " + toc)
dumps[tics[i]] = (
labels[i] + ", tic/toc = " + tic + " / " + toc
)
print("")
print("Tasks in time range: " + str(xlow) + " -> " + str(xhigh))
for key in sorted(dumps):
......@@ -366,13 +369,7 @@ class Container:
if event.xdata > tics[i] and event.xdata < tocs[i]:
tic = "{0:.3f}".format(tics[i])
toc = "{0:.3f}".format(tocs[i])
outstr = (
labels[i]
+ ", tic/toc = "
+ tic
+ " / "
+ toc
)
outstr = labels[i] + ", tic/toc = " + tic + " / " + toc
break
self.output.set(outstr)
except TypeError:
......@@ -383,6 +380,7 @@ class Container:
def quit(self):
self.window.destroy()
window = tk.Tk()
window.protocol("WM_DELETE_WINDOW", window.quit)
container = Container(window, fig, args.motion, nthread, ltics, ltocs, llabels)
......
......@@ -323,7 +323,7 @@ if not args.nolegend:
shadow=True,
bbox_to_anchor=(0.0, 1.0, 1.0, 0.2),
mode="expand",
ncol=4
ncol=4,
)
box = ax.get_position()
ax.set_position([box.x0, box.y0, box.width, box.height * 0.8])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment