--title option to gwpy-plot raises TypeError
As reported by @borjasor, the --title
option to gwpy-plot
doesn't work as designed:
$ gwpy-plot spectrogram --chan H1:PEM-CS_MIC_LVEA_INPUTOPTICS_DQ,raw --start 1227247141 --duration 1200 --out ldvw5168332937436378342.png --fmin 5 --fmax 1024 --imin 0.250 --imax 4.000 --norm --cmap Spectral_r --title TEST```
Traceback (most recent call last):
File "/home/detchar/opt/summary-2.7/bin/gwpy-plot", line 105, in <module>
prod.run()
File "/home/detchar/opt/summary-2.7/lib/python2.7/site-packages/gwpy/cli/cliproduct.py", line 708, in run
self.set_plot_properties()
File "/home/detchar/opt/summary-2.7/lib/python2.7/site-packages/gwpy/cli/cliproduct.py", line 549, in set_plot_properties
self.set_title(self.args.title)
File "/home/detchar/opt/summary-2.7/lib/python2.7/site-packages/gwpy/cli/cliproduct.py", line 648, in set_title
title = label_to_latex(title)
File "/home/detchar/opt/summary-2.7/lib/python2.7/site-packages/gwpy/plot/tex.py", line 148, in label_to_latex
for m in re_latex_control.finditer(text):
TypeError: expected string or buffer
I believe the issue is that the `--title option is being parsed as a list:
but then passed as a single argument to the ax.set_title
method:
which ends up with a re.Pattern
trying to match a list
to an expression:
cc @areeda