Commit 58972ffa91a75a42f8014456c8e637b4a2d58c5d
1 parent
fef2ac1d
Exists in
master
Added min size of window to avoid error on resize
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py
| @@ -8,8 +8,8 @@ | @@ -8,8 +8,8 @@ | ||
| 8 | 8 | ||
| 9 | import pyglet | 9 | import pyglet |
| 10 | #import math | 10 | #import math |
| 11 | -import time | ||
| 12 | -import serial | 11 | +#import time |
| 12 | +#import serial | ||
| 13 | import numpy | 13 | import numpy |
| 14 | import os | 14 | import os |
| 15 | import platform | 15 | import platform |
| @@ -66,6 +66,7 @@ class Plot(pyglet.window.Window): | @@ -66,6 +66,7 @@ class Plot(pyglet.window.Window): | ||
| 66 | def __init__(self, series): | 66 | def __init__(self, series): |
| 67 | """Setup a the details of a plot, and create a corresponding window""" | 67 | """Setup a the details of a plot, and create a corresponding window""" |
| 68 | pyglet.window.Window.__init__(self, resizable=True) | 68 | pyglet.window.Window.__init__(self, resizable=True) |
| 69 | + self.set_minimum_size(320,320) | ||
| 69 | self.series = series | 70 | self.series = series |
| 70 | self.font = 'Arkhip' | 71 | self.font = 'Arkhip' |
| 71 | self.margins = (0.09, 0.08) # Fractions of window size | 72 | self.margins = (0.09, 0.08) # Fractions of window size |