From 6142c52a744c371a98d47d024c6eb7180da61580 Mon Sep 17 00:00:00 2001 From: Francesco Pannarale Date: Mon, 23 Sep 2024 12:29:11 +0200 Subject: [PATCH] Fix pygrb skygrid plot (#4888) * Fix pygrb skygrid plot * Add plot * Full stop --- bin/pygrb/pycbc_pygrb_plot_skygrid | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/pygrb/pycbc_pygrb_plot_skygrid b/bin/pygrb/pycbc_pygrb_plot_skygrid index 435f37f1d20..3670d08aa34 100644 --- a/bin/pygrb/pycbc_pygrb_plot_skygrid +++ b/bin/pygrb/pycbc_pygrb_plot_skygrid @@ -70,6 +70,7 @@ trig_file = os.path.abspath(opts.trig_file) outfile = opts.output_file if opts.plot_title is None: opts.plot_title = 'PyGRB sky grid' +plot_caption = 'Search sky grid points.' logging.info("Imported and ready to go.") @@ -100,13 +101,15 @@ if opts.verbose: fig = plt.figure() ax = fig.gca() -ax.set_xlabel(xlabel)#, fontsize=16) -ax.set_ylabel(ylabel)#, fontsize=16) +ax.grid() +ax.set_xlabel(xlabel) +ax.set_ylabel(ylabel) # Trigger RA/Dec data is stored in radians, so convert to degrees ax.plot(numpy.rad2deg(trig_data['network/ra']), numpy.rad2deg(trig_data['network/dec']), 'ko', markerfacecolor='blue') # Wrap up +plt.tight_layout() save_fig_with_metadata(fig, outfile, cmd=' '.join(sys.argv), - title=opts.plot_title, caption=opts.plot_caption) + title=opts.plot_title, caption=plot_caption) #fig_kwds=fig_kwds, plt.close()