Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9466318

Browse filesBrowse 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
Copy full SHA for 9466318

File tree

Expand file treeCollapse file tree

2 files changed

+15
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-1
lines changed
+13Lines 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

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+2-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.