diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-12-30 18:24:46 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-12-30 18:27:44 -0500 |
commit | f10bd5726d6a7d228f6cbbf211ffd243c54cff3a (patch) | |
tree | ba16e5f7dd218133f3cc076b24c54ab6616953c5 /scripts | |
parent | 7db6fa7bfcc52afbdff27caa83ade3ddd65026f2 (diff) | |
download | kutter-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')
-rwxr-xr-x | scripts/graphstats.py | 6 |
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) |