Skip to content

Commit a0bb42b

Browse files
committed
API: rename quick_axes -> gna
In phone conversation with @efiring he suggesting changing 'quick_axes' to `gna` for 'get new axes' in analogy and contrast to `gca` -> 'get current axes (and create one if you have to)'.
1 parent 3b30f18 commit a0bb42b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

doc/users/whats_new/2015-07-30_ensure_ax.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Decorators to ensure an Axes exists & ``plt.quick_axes``
2-
--------------------------------------------------------
1+
Decorators to ensure an Axes exists & ``plt.gna``
2+
-------------------------------------------------
33

44
Added a top-level function to `pyplot` to create a single axes
55
figure and return the `Axes` object.
@@ -15,4 +15,4 @@ positional argument and returns a function which allows the axes to be
1515
passed either as the first positional argument or as a kwarg. If the
1616
`Axes` is not provided either gets the current axes (via `plt.gca()`)
1717
for `ensure_ax` and `ensure_ax_meth` or creating a new single-axes figure
18-
(via `plt.quick_axes`) for `ensure_new_ax`
18+
(via `plt.gna`) for `ensure_new_ax`

lib/matplotlib/pyplot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def inner(*args, **kwargs):
295295
ax = args[0]
296296
args = args[1:]
297297
else:
298-
ax = quick_axes()
298+
ax = gna()
299299
return func(ax, *args, **kwargs)
300300
pre_doc = inner.__doc__
301301
if pre_doc is None:
@@ -1373,7 +1373,7 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
13731373
return ret
13741374

13751375

1376-
def quick_axes(figsize=None, tight_layout=False):
1376+
def gna(figsize=None, tight_layout=False):
13771377
"""
13781378
Create a single new axes in a new figure.
13791379

0 commit comments

Comments
 (0)