scripts/graph-build-time: clarify backend selection
authorLuca Ceresoli <luca@lucaceresoli.net>
Sun, 12 Oct 2014 10:52:21 +0000 (12:52 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 12 Oct 2014 15:21:00 +0000 (17:21 +0200)
This instruction in the middle of 'import' lines looks very strange.

Also, it was not obvious to me what the 'Agg' backend is.

Both things are actually correct, but it took a while to find out why.
So clarify with a comment to save someone else's time.

[Peter: fix s/soe/some/ typo]
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Sascha Arthur <sascha.arthur@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/scripts/graph-build-time

index 4bb90c278b468f80f1630aa543e0654ae2586b80..433cd41d7337a76be27c7244cb5b98c87b8f9600 100755 (executable)
 import matplotlib as mpl
 import numpy
 
+# Use the Agg backend (which produces a PNG output, see
+# http://matplotlib.org/faq/usage_faq.html#what-is-a-backend),
+# otherwise an incorrect backend is used on some host machines).
+# Note: matplotlib.use() must be called *before* matplotlib.pyplot.
 mpl.use('Agg')
+
 import matplotlib.pyplot as plt
 import matplotlib.font_manager as fm
 import csv