Skip to content
Snippets Groups Projects

Plotting

Merged Lee McCuller requested to merge lee-mcculler/pygwinc:plotting into master
4 files
+ 136
35
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 16
4
@@ -54,6 +54,8 @@ parser.add_argument('--matlab', '-m', action='store_true',
help="use MATLAB gwinc engine to calculate noises")
parser.add_argument('--fom',
help="calculate inspiral range for resultant spectrum ('func:param=val,param=val')")
parser.add_argument('-D', '--displacement', action='store_true', default = False, dest='displacement',
help="supress adding displacement sensitivity axis")
group = parser.add_mutually_exclusive_group()
group.add_argument('--dump', '-d', dest='dump', action='store_true',
help="print IFO parameters to stdout and exit")
@@ -146,14 +148,24 @@ You may interact with plot using "plt." methods, e.g.:
>>> plt.savefig("foo.pdf")
''')
ipshell.enable_pylab()
ipshell.run_code("plot_noise(noises)")
ipshell.run_code("plot_noise(ifo, noises)")
ipshell.run_code("plt.title('{}')".format(title))
ipshell()
elif args.plot:
plot_noise(noises)
plt.title(title)
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
plot_noise(
ifo,
noises,
ax = ax,
displacement = args.displacement,
)
ax.set_title(title)
fig.tight_layout()
if args.save:
plt.savefig(args.save)
fig.savefig(
args.save,
)
else:
plt.show()
Loading