Skip to content
Snippets Groups Projects
Verified Commit 648122a2 authored by Nicki Křížek's avatar Nicki Křížek
Browse files

tools/plot*: make charts bigger and easier to read

This is a simple style change for the generated charts. It makes all the
charts the same size suitable for widescreen displays.

There are also some minor adjustments for line styles for better
readability especially when charts contain lots of data.
parent c0237544
No related tags found
1 merge request!64tools/plot*: make charts bigger and easier to read
Pipeline #103827 passed
......@@ -23,7 +23,7 @@ SCALE_MAGIC = 10000
def init_plot(title):
_, ax = plt.subplots(figsize=(9, 9))
_, ax = plt.subplots(figsize=(16, 9))
ax.set_xscale('log')
ax.set_yscale('log')
......
......@@ -38,7 +38,7 @@ def siname(n):
def init_plot(title):
_, ax = plt.subplots(figsize=(8, 6))
_, ax = plt.subplots(figsize=(16, 9))
ax.set_xlabel('Time [s]')
ax.set_ylabel('Number of connections')
......@@ -46,7 +46,7 @@ def init_plot(title):
ax.grid(True, axis='x', which='major')
ax.grid(True, axis='y', which='major')
ax.grid(True, axis='y', which='minor', linestyle='--', color='#DDDDDD')
ax.grid(True, axis='y', which='minor', linestyle='dotted', color='#DDDDDD')
return ax
......@@ -65,7 +65,7 @@ def plot(ax, data, label, eval_func, min_timespan=0, color=None):
xvalues.append(time)
yvalues.append(eval_func(stats))
ax.plot(xvalues, yvalues, label=label, marker='o', linestyle='--', color=color)
ax.plot(xvalues, yvalues, label=label, marker='x', linestyle='dotted', color=color)
def main():
......
......@@ -44,7 +44,7 @@ def siname(n):
def init_plot(title):
# plt.rcParams["font.family"] = "monospace"
_, ax = plt.subplots(figsize=(9, 9))
_, ax = plt.subplots(figsize=(16, 9))
ax.set_xscale('log')
ax.xaxis.set_major_formatter(mtick.FormatStrFormatter('%s'))
......
......@@ -20,7 +20,7 @@ sinames = ['', ' k', ' M', ' G', ' T']
def init_plot(title):
_, ax = plt.subplots(figsize=(8, 6))
_, ax = plt.subplots(figsize=(16, 9))
ax.set_xlabel('Time [s]')
ax.set_ylabel('Packets per sampling period')
......@@ -45,7 +45,7 @@ def plot(ax, data, label, since, until, line_props):
xvalues.append(time_s)
yvalues.append(rate)
ax.plot(xvalues, yvalues, label=label, linestyle='', **line_props)
ax.plot(xvalues, yvalues, label=label, linestyle='dotted', **line_props)
ax.set_xlim(xmin=since)
if math.isfinite(until):
ax.set_xlim(xmax=until)
......
......@@ -118,7 +118,7 @@ response_rate = stat_field_rate('answers')
def init_plot(title):
_, ax = plt.subplots(figsize=(8, 6))
_, ax = plt.subplots(figsize=(16, 9))
ax.set_xlabel('Time [s]')
ax.set_ylabel('Response Rate [%]')
......@@ -130,7 +130,7 @@ def init_plot(title):
ax.grid(True, axis='y', which='major')
ax.yaxis.set_minor_locator(MultipleLocator(2))
ax.grid(True, axis='y', which='minor', linestyle='dashed', color='#DDDDDD')
ax.grid(True, axis='y', which='minor', linestyle='dotted', color='#DDDDDD')
return ax
......@@ -146,7 +146,7 @@ def set_axes_limits(ax):
def plot_response_rate(
ax, data, label,
eval_func=None, min_timespan=0, marker='o', linestyle='--', color=None):
eval_func=None, min_timespan=0, marker='x', linestyle='dotted', color=None):
stats_periodic = data['stats_periodic']
time_offset = stats_periodic[0]['since_ms']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment