Commit 50fddf96 authored by Michael König's avatar Michael König

param to set plot- & figure-title

parent a5c9387e
......@@ -12,8 +12,6 @@ VALUES_TO_PLOT = ['cwnd', 'sst', 'rtt', 'smoothedThroughput'] # (only values for
VALUES_TO_PROCESS = ['time'] + VALUES_TO_PLOT #helper to init all data structures
# Strings for UI-elements
FIGURE_TITLE = "TCPlivePLOT"
PLOT_TITLE = "Data from"
PAUSE = "Pause"
QUIT = "Quit"
......@@ -215,13 +213,14 @@ class LiveGui(GuiBase):
self.__minVal = 9999999999
self.__maxVal = 0
fig = plt.figure(FIGURE_TITLE)
fig = plt.figure(self.options.title)
fig.canvas.mpl_connect('key_press_event', self.plotKeyPressCallback)
self.__ax = plt.axes()
# self.__ax2 = self.__ax.twinx()
self.__ax.set_autoscaley_on(False)
self.__ax.set_xlim(0, self.options.xDelta)
self.__ax.set_title(PLOT_TITLE + " :" + ', :'.join(map(str, self.options.filterPorts)))
# self.__ax.set_title(PLOT_TITLE + " :" + ', :'.join(map(str, self.options.filterPorts)))
self.__ax.set_title(self.options.title)
self.__plotLines = {}
self.__plotValues = {}
......
......@@ -16,6 +16,7 @@ TCP_LOG_FORMAT_VERSION_MIN = "2"
DEFAULT_LOGFILE_PATH = "/tmp/tcplog.log"
DEFAULT_INPUT_BACKEND = "socket"
DEFAULT_TITLE = "TCPlivePLOT"
# default values
DEFAULT_SOCKETSERVER_PORT = 11337
......@@ -218,6 +219,14 @@ def parse_options():
type=str,
default=[])
parser.add_argument(
"-t",
"--title",
help="Set plot and figure title (default: " + DEFAULT_TITLE + ")",
dest="title",
type=str,
default=DEFAULT_TITLE)
parser.add_argument(
"-d",
"--debug", help="Debug mode - ignores quiet mode (default: false)",
......
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