Skip to content

Commit 7daf247

Browse files
committed
Fix #5987: add extra space around axes
1 parent 869cc9d commit 7daf247

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ def cla(self):
10281028
)
10291029

10301030
self.titleOffsetTrans = mtransforms.ScaledTranslation(
1031-
0.0, 5.0 / 72.0, self.figure.dpi_scale_trans)
1031+
0.0, 9.0 / 72.0, self.figure.dpi_scale_trans)
10321032
self.title = mtext.Text(
10331033
x=0.5, y=1.0, text='',
10341034
fontproperties=props,

lib/matplotlib/rcsetup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,13 +1129,13 @@ def validate_hist_bins(s):
11291129
'figure.autolayout': [False, validate_bool],
11301130
'figure.max_open_warning': [20, validate_int],
11311131

1132-
'figure.subplot.left': [0.125, ValidateInterval(0, 1, closedmin=True,
1132+
'figure.subplot.left': [0.155, ValidateInterval(0, 1, closedmin=True,
11331133
closedmax=True)],
1134-
'figure.subplot.right': [0.9, ValidateInterval(0, 1, closedmin=True,
1134+
'figure.subplot.right': [0.87, ValidateInterval(0, 1, closedmin=True,
11351135
closedmax=True)],
1136-
'figure.subplot.bottom': [0.1, ValidateInterval(0, 1, closedmin=True,
1136+
'figure.subplot.bottom': [0.13, ValidateInterval(0, 1, closedmin=True,
11371137
closedmax=True)],
1138-
'figure.subplot.top': [0.9, ValidateInterval(0, 1, closedmin=True,
1138+
'figure.subplot.top': [0.87, ValidateInterval(0, 1, closedmin=True,
11391139
closedmax=True)],
11401140
'figure.subplot.wspace': [0.2, ValidateInterval(0, 1, closedmin=True,
11411141
closedmax=False)],

matplotlibrc.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,10 @@ backend : $TEMPLATE_BACKEND
427427

428428
# The figure subplot parameters. All dimensions are a fraction of the
429429
# figure width or height
430-
#figure.subplot.left : 0.125 # the left side of the subplots of the figure
431-
#figure.subplot.right : 0.9 # the right side of the subplots of the figure
432-
#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure
433-
#figure.subplot.top : 0.9 # the top of the subplots of the figure
430+
#figure.subplot.left : 0.155 # the left side of the subplots of the figure
431+
#figure.subplot.right : 0.87 # the right side of the subplots of the figure
432+
#figure.subplot.bottom : 0.13 # the bottom of the subplots of the figure
433+
#figure.subplot.top : 0.87 # the top of the subplots of the figure
434434
#figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots
435435
#figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots
436436

0 commit comments

Comments
 (0)