Commit 7aab77b7 authored by Jameson Rollins's avatar Jameson Rollins
Browse files

cli: fix title

closes #77
parent 53cebd19
Pipeline #165559 passed with stages
in 4 minutes and 26 seconds
......@@ -234,13 +234,11 @@ def main():
if args.title:
plot_style['title'] = args.title
elif 'title' in plot_style:
pass
elif budget:
plot_style['title'] = "GWINC Noise Budget: {}".format(budget.name)
else:
plot_style['title'] = "GWINC Noise Budget: {}".format(args.IFO)
plot_style['title'] = plot_style.get(
'title',
"GWINC Noise Budget: {}".format(args.IFO),
)
if args.fom:
logger.info("calculating inspiral {}...".format(range_func))
H = inspiral_range.CBCWaveform(freq, **range_params)
......@@ -313,10 +311,11 @@ In [.]: plt.savefig("foo.pdf")
logger.debug("plotting noises...")
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
if subtitle:
plot_style['title'] += '\n' + subtitle
plot_budget(
trace,
ax=ax,
subtitle=subtitle,
**plot_style
)
fig.tight_layout()
......
......@@ -61,10 +61,7 @@ def plot_budget(
if 'ylabel' in kwargs:
ax.set_ylabel(kwargs['ylabel'])
if 'title' in kwargs:
title = kwargs['title']
if 'subtitle' in kwargs:
title += '\n' + kwargs['subtitle']
ax.set_title(title)
ax.set_title(kwargs['title'])
return fig
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment