-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- graph file savename now correctly handles separators w os.sep - triangle plot saved to svg format to avoid stripy plot - see corner.py stripy bug: dfm/corner.py#261
- Loading branch information
Catherine Beauchemin
authored and
Catherine Beauchemin
committed
May 23, 2024
1 parent
fdc7724
commit f662ab6
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env python | ||
# Copyright (C) 2017-2021 Catherine Beauchemin <[email protected]> | ||
# Copyright (C) 2017-2024 Catherine Beauchemin <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -21,6 +21,7 @@ | |
# ============================================================================= | ||
# | ||
import argparse | ||
import os | ||
import phymcmc.plot | ||
|
||
# | ||
|
@@ -49,7 +50,7 @@ def parse_args(): | |
# Parsing arguments | ||
args = parser.parse_args() | ||
# Path + basename for plot(s) | ||
savename = args.chainfile.split('/')[-1].split('.hdf5')[0] | ||
savename = args.chainfile.split(os.sep)[-1].split('.hdf5')[0] | ||
savename = args.savedirectory + '/' + savename | ||
# Parse types of plots requested | ||
plotsrequested = set(args.type.split(',')) | ||
|
@@ -77,7 +78,7 @@ if {'hist','all'} & plotsrequested: | |
|
||
if {'triangle','all'} & plotsrequested: | ||
fig = phymcmc.plot.triangle( args.chainfile, nburn=args.nburn ) | ||
fig.savefig(savename+'_triangle.pdf', bbox_inches='tight') | ||
fig.savefig(savename+'_triangle.svg', bbox_inches='tight') | ||
|
||
if {'square','all'} & plotsrequested: | ||
gridfig = phymcmc.plot.square( args.chainfile, nburn=args.nburn ) | ||
|