Make legend smaller on analysis plots.
I decreased the legend because it kept getting in the way of the
actual data.
Two things change with this commit:
- Reduced font size and moved the legend closer to the top-left corner.
- Optionally omit binary from legend using command line option.
Change-Id: Id9e1197c6184a16e944a433553b3b284467ae369
diff --git a/frc971/analysis/plot_action.py b/frc971/analysis/plot_action.py
index 1adb4db..f719c97 100755
--- a/frc971/analysis/plot_action.py
+++ b/frc971/analysis/plot_action.py
@@ -49,6 +49,8 @@
help='The file from which to read logs and plot.')
arg_parser.add_argument('--plot-defs', action='store', type=str, \
help='Read the items to plot from this file.')
+ arg_parser.add_argument('--no-binary', '-n', action='store_true', \
+ help='Don\'t print the binary name in the legend.')
args = arg_parser.parse_args(sys.argv[1:])
@@ -72,7 +74,7 @@
p.Add('fridge', 'output', 'left_elevator')
p.Add('fridge', 'output', 'right_elevator')
- p.PlotFile(args.log_file)
+ p.PlotFile(args.log_file, args.no_binary)
if __name__ == '__main__':
main()