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 fa970eb

Browse filesBrowse files
committed
Merge pull request #1327 from jenshnielsen/offset_text
plt.subplots: Set the visibility of the offset text to false on the shared axes.
2 parents 1c76af5 + 104c03c commit fa970eb
Copy full SHA for fa970eb

File tree

Expand file treeCollapse file tree

6 files changed

+1801
-0
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+1801
-0
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,7 @@ def tk_window_focus():
10781078
'matplotlib.tests.test_scale',
10791079
'matplotlib.tests.test_simplification',
10801080
'matplotlib.tests.test_spines',
1081+
'matplotlib.tests.test_subplots',
10811082
'matplotlib.tests.test_text',
10821083
'matplotlib.tests.test_ticker',
10831084
'matplotlib.tests.test_tightlayout',

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,13 +978,15 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
978978
for ax in axarr[:-1, :].flat:
979979
for label in ax.get_xticklabels():
980980
label.set_visible(False)
981+
ax.xaxis.offsetText.set_visible(False)
981982

982983
if sharey in ["row", "all"] and ncols > 1:
983984
#if sharey and ncols>1:
984985
# turn off all but the first column
985986
for ax in axarr[:, 1:].flat:
986987
for label in ax.get_yticklabels():
987988
label.set_visible(False)
989+
ax.yaxis.offsetText.set_visible(False)
988990

989991
if squeeze:
990992
# Reshape the array to have the final desired dimension (nrow,ncol),
Binary file not shown.
Loading

0 commit comments

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