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 439a122

Browse filesBrowse files
authored
Merge pull request #16988 from anntzer/rthetagrids
Make plt.{r,theta}grids act as setters even when all args are kwargs.
2 parents 3b41253 + c8ccd84 commit 439a122
Copy full SHA for 439a122

File tree

Expand file treeCollapse file tree

2 files changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-2
lines changed

‎doc/api/next_api_changes/behaviour.rst

Copy file name to clipboardExpand all lines: doc/api/next_api_changes/behaviour.rst
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,8 @@ support for it will be dropped in a future Matplotlib release.
150150
`.font_manager.json_dump` now locks the font manager dump file
151151
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152152
... to prevent multiple processes from writing to it at the same time.
153+
154+
`.pyplot.rgrids` and `.pyplot.thetagrids` now act as setters also when called with only kwargs
155+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156+
Previously, keyword arguments were silently ignored when no positional
157+
arguments were given.

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ def rgrids(*args, **kwargs):
16271627
ax = gca()
16281628
if not isinstance(ax, PolarAxes):
16291629
raise RuntimeError('rgrids only defined for polar axes')
1630-
if len(args) == 0:
1630+
if not args and not kwargs:
16311631
lines = ax.yaxis.get_gridlines()
16321632
labels = ax.yaxis.get_ticklabels()
16331633
else:
@@ -1694,7 +1694,7 @@ def thetagrids(*args, **kwargs):
16941694
ax = gca()
16951695
if not isinstance(ax, PolarAxes):
16961696
raise RuntimeError('thetagrids only defined for polar axes')
1697-
if len(args) == 0:
1697+
if not args and not kwargs:
16981698
lines = ax.xaxis.get_ticklines()
16991699
labels = ax.xaxis.get_ticklabels()
17001700
else:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.