Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Use @keyword_only for graphics_array.save() and .show().
Browse files Browse the repository at this point in the history
This is based on ticket #15515 comment 16, which was partly undone
by commit 7747261 from #17234. Since neither ticket discussed an
official deprecation (the former left things undeprecated, the latter
simply removed positional functionality with no contingency), the
deprecation warnings will refer to 16607 where this can be discussed.
  • Loading branch information
gagern committed Mar 13, 2015
1 parent c073211 commit 9b9373b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sage/plot/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3400,7 +3400,8 @@ def append(self, g):
# Not clear if there is a way to do this
raise NotImplementedError('Appending to a graphics array is not yet implemented')

def save(self, filename=None, dpi=DEFAULT_DPI, figsize=None, axes=None,
@keyword_only(positional=4, deprecation=16607, extra="axes")
def save(self, filename=None, dpi=DEFAULT_DPI, figsize=None,
**kwds):
r"""
Save the graphics array.
Expand Down Expand Up @@ -3467,9 +3468,9 @@ def save(self, filename=None, dpi=DEFAULT_DPI, figsize=None, axes=None,
for i,g in zip(range(1, dims+1), glist):
subplot = figure.add_subplot(rows, cols, i)
g.matplotlib(filename, figure=figure, sub=subplot,
verify=do_verify, axes = axes, **kwds)
verify=do_verify, **kwds)
g.save(filename, dpi=dpi, figure=figure, sub=subplot,
verify=do_verify, axes=axes, **kwds)
verify=do_verify, **kwds)

def save_image(self, filename=None, *args, **kwds):
r"""
Expand All @@ -3493,6 +3494,7 @@ def save_image(self, filename=None, *args, **kwds):
"""
self.save(filename, *args, **kwds)

@keyword_only(deprecation=16607, extra="filename,dpi,figsize,axes")
def show(self, **kwds):
r"""
Show this graphics array immediately.
Expand Down

0 comments on commit 9b9373b

Please sign in to comment.