Skip to content

Commit

Permalink
Fixes to phymcmc_plotter
Browse files Browse the repository at this point in the history
- 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.
7 changes: 4 additions & 3 deletions bin/phymcmc_plotter
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright (C) 2017-2021 Catherine Beauchemin <cbeau@users.sourceforge.net>
# Copyright (C) 2017-2024 Catherine Beauchemin <cbeau@users.sourceforge.net>
#
# 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
Expand All @@ -21,6 +21,7 @@
# =============================================================================
#
import argparse
import os
import phymcmc.plot

#
Expand Down Expand Up @@ -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(','))
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit f662ab6

Please sign in to comment.