Skip to content

Commit

Permalink
allow kwargs in export savefig (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
msyriac committed Apr 2, 2023
1 parent 6429b18 commit c10526a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions getdist/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -3240,7 +3240,7 @@ def add_text_left(self, text_label, x=0.05, y=0.06, ax=None, **kwargs):
args.update(kwargs)
self.add_text(text_label, x, y, ax, **args)

def export(self, fname=None, adir=None, watermark=None, tag=None):
def export(self, fname=None, adir=None, watermark=None, tag=None, **kwargs):
"""
Exports given figure to a file. If the filename is not specified, saves to a file with the same
name as the calling script (useful for plot scripts where the script name matches the output figure).
Expand All @@ -3265,7 +3265,7 @@ def export(self, fname=None, adir=None, watermark=None, tag=None):
self.fig.text(0.45, 0.5, escapeLatex(watermark), fontsize=30, color='gray',
ha='center', va='center', alpha=0.2)

self.fig.savefig(fname, bbox_extra_artists=self.extra_artists, bbox_inches='tight')
self.fig.savefig(fname, bbox_extra_artists=self.extra_artists, bbox_inches='tight', **kwargs)

@staticmethod
def _par_name_list(par_list):
Expand Down

0 comments on commit c10526a

Please sign in to comment.