Commit 6286ad74 authored by Michael König's avatar Michael König

parameter for static y-axis (disables autoscaling)

parent f62515ab
......@@ -369,7 +369,8 @@ class LiveGui(GuiBase):
self.__lastDrawTimestamp = time.perf_counter()
# y-scaling
if(self.options.yAxisMax is 0):
# y-scaling (autoscaling)
lines = self.__ax.get_lines()
bot,top = np.inf, -np.inf
for line in lines:
......@@ -387,6 +388,9 @@ class LiveGui(GuiBase):
else:
# intial y-scale
self.__ax.set_ylim(0, 500)
else:
# static y-axis (no autoscaling)
self.__ax.set_ylim(0, self.options.yAxisMax)
return self.returnAllLines()
......
......@@ -192,6 +192,14 @@ def parse_options():
type=int,
default=20)
parser.add_argument(
"-y",
help="Static Y-axis (default: 0 = auto)",
dest="yAxisMax",
type=int,
default=0)
# TODO: remove as param
parser.add_argument(
"-r",
......
Markdown is supported
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