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

Skip to content

Commit e24d5dc

Browse files
mdboomtacaswell
authored andcommitted
Fix #5987: add extra space around axes
1 parent 182354b commit e24d5dc

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
@@ -1048,7 +1048,7 @@ def cla(self):
10481048
)
10491049

10501050
self.titleOffsetTrans = mtransforms.ScaledTranslation(
1051-
0.0, 5.0 / 72.0, self.figure.dpi_scale_trans)
1051+
0.0, 9.0 / 72.0, self.figure.dpi_scale_trans)
10521052
self.title = mtext.Text(
10531053
x=0.5, y=1.0, text='',
10541054
fontproperties=props,

lib/matplotlib/rcsetup.py

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

1190-
'figure.subplot.left': [0.125, ValidateInterval(0, 1, closedmin=True,
1190+
'figure.subplot.left': [0.155, ValidateInterval(0, 1, closedmin=True,
11911191
closedmax=True)],
1192-
'figure.subplot.right': [0.9, ValidateInterval(0, 1, closedmin=True,
1192+
'figure.subplot.right': [0.87, ValidateInterval(0, 1, closedmin=True,
11931193
closedmax=True)],
1194-
'figure.subplot.bottom': [0.1, ValidateInterval(0, 1, closedmin=True,
1194+
'figure.subplot.bottom': [0.13, ValidateInterval(0, 1, closedmin=True,
11951195
closedmax=True)],
1196-
'figure.subplot.top': [0.9, ValidateInterval(0, 1, closedmin=True,
1196+
'figure.subplot.top': [0.87, ValidateInterval(0, 1, closedmin=True,
11971197
closedmax=True)],
11981198
'figure.subplot.wspace': [0.2, ValidateInterval(0, 1, closedmin=True,
11991199
closedmax=False)],

matplotlibrc.template

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

432432
# The figure subplot parameters. All dimensions are a fraction of the
433433
# figure width or height
434-
#figure.subplot.left : 0.125 # the left side of the subplots of the figure
435-
#figure.subplot.right : 0.9 # the right side of the subplots of the figure
436-
#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure
437-
#figure.subplot.top : 0.9 # the top of the subplots of the figure
434+
#figure.subplot.left : 0.155 # the left side of the subplots of the figure
435+
#figure.subplot.right : 0.87 # the right side of the subplots of the figure
436+
#figure.subplot.bottom : 0.13 # the bottom of the subplots of the figure
437+
#figure.subplot.top : 0.87 # the top of the subplots of the figure
438438
#figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots
439439
#figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots
440440

0 commit comments

Comments
 (0)