Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9466318

Browse files
committed
Updated docstring and created whats_new document
These changes are meant to document the added parameter to the subplot2grid method
1 parent ec54580 commit 9466318

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
New Firgure Parameter for subplot2grid
2+
--------------------------------------
3+
4+
A ``fig`` parameter now exists for the method :func:`subplot2grid`. This allows
5+
for the figure that the subplots will be created in to be specified. If ``fig``
6+
is ``None`` (default) then the method will use the current figure retrieved by
7+
:func:`gcf`.
8+
9+
Example
10+
```````
11+
::
12+
13+
subplot2grid(shape, loc, rowspan=1, colspan=1, fig=myfig)

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,8 @@ def subplot2grid(shape, loc, rowspan=1, colspan=1, fig=None, **kwargs):
11511151
"""
11521152
Create a subplot in a grid. The grid is specified by *shape*, at
11531153
location of *loc*, spanning *rowspan*, *colspan* cells in each
1154-
direction. The index for loc is 0-based. ::
1154+
direction. The index for loc is 0-based. The current figure will
1155+
be used unless *fig* is specified. ::
11551156
11561157
subplot2grid(shape, loc, rowspan=1, colspan=1)
11571158

0 commit comments

Comments
 (0)