aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/graphstats.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-12-30 18:24:46 -0500
committerKevin O'Connor <kevin@koconnor.net>2017-12-30 18:27:44 -0500
commitf10bd5726d6a7d228f6cbbf211ffd243c54cff3a (patch)
treeba16e5f7dd218133f3cc076b24c54ab6616953c5 /scripts/graphstats.py
parent7db6fa7bfcc52afbdff27caa83ade3ddd65026f2 (diff)
downloadkutter-f10bd5726d6a7d228f6cbbf211ffd243c54cff3a.tar.gz
kutter-f10bd5726d6a7d228f6cbbf211ffd243c54cff3a.tar.xz
kutter-f10bd5726d6a7d228f6cbbf211ffd243c54cff3a.zip
graphstats: Use a smaller font in the graph legend
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts/graphstats.py')
-rwxr-xr-xscripts/graphstats.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/graphstats.py b/scripts/graphstats.py
index 4c656c7a..dbc3438b 100755
--- a/scripts/graphstats.py
+++ b/scripts/graphstats.py
@@ -7,7 +7,7 @@
import optparse, datetime
import matplotlib
matplotlib.use('Agg')
-import matplotlib.pyplot, matplotlib.dates
+import matplotlib.pyplot, matplotlib.dates, matplotlib.font_manager
MAXBANDWIDTH=25000.
MAXBUFFER=2.
@@ -100,7 +100,9 @@ def plot_mcu(data, maxbw, outname, graph_awake=False):
ax1.plot_date(times, bwdeltas, 'g', label='Bandwidth')
ax1.plot_date(times, loads, 'r', label='MCU load')
ax1.plot_date(times, hostbuffers, 'c', label='Host buffer')
- ax1.legend(loc='best')
+ fontP = matplotlib.font_manager.FontProperties()
+ fontP.set_size('x-small')
+ ax1.legend(loc='best', prop=fontP)
ax1.xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%H:%M'))
ax1.grid(True)
fig.savefig(outname)