Skip to content

Commit f5f403f

Browse files
Committing Feature Implementation for Issue 13930
1 parent ab102c0 commit f5f403f

File tree

6 files changed

+24
-128
lines changed

6 files changed

+24
-128
lines changed

.gitignore

+2-126
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,2 @@
1-
#########################################
2-
# OS-specific temporary and backup files
3-
.DS_Store
4-
5-
#########################################
6-
# Editor temporary/working/backup files #
7-
.#*
8-
[#]*#
9-
*~
10-
*$
11-
*.bak
12-
*.kdev4
13-
.project
14-
.pydevproject
15-
*.swp
16-
.idea
17-
.vscode/
18-
19-
# Compiled source #
20-
###################
21-
*.a
22-
*.com
23-
*.class
24-
*.dll
25-
*.exe
26-
*.o
27-
*.py[ocd]
28-
*.so
29-
30-
# Python files #
31-
################
32-
# meson-python working directory
33-
build
34-
.mesonpy*
35-
36-
# meson-python/build frontend dist directory
37-
dist
38-
# Egg metadata
39-
*.egg-info
40-
.eggs
41-
# wheel metadata
42-
pip-wheel-metadata/*
43-
# tox testing tool
44-
.tox
45-
# build subproject files
46-
subprojects/*/
47-
!subprojects/packagefiles/
48-
49-
# OS generated files #
50-
######################
51-
.directory
52-
.gdb_history
53-
.DS_Store?
54-
ehthumbs.db
55-
Icon?
56-
Thumbs.db
57-
58-
# Things specific to this project #
59-
###################################
60-
galleries/tutorials/intermediate/CL01.png
61-
galleries/tutorials/intermediate/CL02.png
62-
63-
# Documentation generated files #
64-
#################################
65-
# sphinx build directory
66-
doc/_build
67-
doc/api/_as_gen
68-
# autogenerated by sphinx-gallery
69-
doc/examples
70-
doc/gallery
71-
doc/modules
72-
doc/plot_types
73-
doc/pyplots/tex_demo.png
74-
doc/tutorials
75-
doc/users/explain
76-
lib/dateutil
77-
galleries/examples/*/*.bmp
78-
galleries/examples/*/*.eps
79-
galleries/examples/*/*.pdf
80-
galleries/examples/*/*.png
81-
galleries/examples/*/*.svg
82-
galleries/examples/*/*.svgz
83-
result_images
84-
doc/_static/constrained_layout*.png
85-
doc/.mpl_skip_subdirs.yaml
86-
doc/_tags
87-
sg_execution_times.rst
88-
89-
# Nose/Pytest generated files #
90-
###############################
91-
.pytest_cache/
92-
.cache/
93-
.coverage
94-
.coverage.*
95-
*.py,cover
96-
cover/
97-
.noseids
98-
__pycache__
99-
100-
# Conda files #
101-
###############
102-
__conda_version__.txt
103-
lib/png.lib
104-
lib/z.lib
105-
106-
# Environments #
107-
################
108-
.env
109-
.venv
110-
env/
111-
venv/
112-
ENV/
113-
env.bak/
114-
venv.bak/
115-
116-
# Jupyter files #
117-
#################
118-
119-
.ipynb_checkpoints/
120-
121-
# Vendored dependencies #
122-
#########################
123-
lib/matplotlib/backends/web_backend/node_modules/
124-
lib/matplotlib/backends/web_backend/package-lock.json
125-
126-
LICENSE/LICENSE_QHULL
1+
# Created by venv; see https://docs.python.org/3/library/venv.html
2+
*

lib/matplotlib/mpl-data/matplotlibrc

+5
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@
420420
#axes.spines.top: True
421421
#axes.spines.right: True
422422

423+
#axes.spines.left.position: outward, 0.0 # set (outward, axes, data) position
424+
#axes.spines.bottom.position: outward, 0.0
425+
#axes.spines.top.position: outward, 0.0
426+
#axes.spines.right.position: outward, 0.0
427+
423428
#axes.unicode_minus: True # use Unicode for the minus symbol rather than hyphen. See
424429
# https://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes
425430
#axes.prop_cycle: cycler(color='tab10')

lib/matplotlib/mpl-data/stylelib/classic.mplstyle

+5
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ axes.prop_cycle : cycler('color', 'bgrcmyk')
215215
# as list of string colorspecs:
216216
# single letter, long name, or
217217
# web-style hex
218+
axes.spines.bottom.position: outward, 0.0
219+
axes.spines.left.position: outward, 0.0
220+
axes.spines.right.position: outward, 0.0
221+
axes.spines.top.position: outward, 0.0
222+
218223
axes.autolimit_mode : round_numbers
219224
axes.xmargin : 0 # x margin. See `axes.Axes.margins`
220225
axes.ymargin : 0 # y margin See `axes.Axes.margins`

lib/matplotlib/rcsetup.py

+5
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,11 @@ def _convert_validator_spec(key, conv):
11081108
"axes.spines.bottom": validate_bool, # denoting data boundary.
11091109
"axes.spines.top": validate_bool,
11101110

1111+
"axes.spines.left.position": validate_anylist,
1112+
"axes.spines.right.position": validate_anylist,
1113+
"axes.spines.bottom.position": validate_anylist,
1114+
"axes.spines.top.position": validate_anylist,
1115+
11111116
"axes.titlesize": validate_fontsize, # Axes title fontsize
11121117
"axes.titlelocation": ["left", "center", "right"], # Axes title alignment
11131118
"axes.titleweight": validate_fontweight, # Axes title font weight

lib/matplotlib/spines.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,12 @@ def get_path(self):
202202

203203
def _ensure_position_is_set(self):
204204
if self._position is None:
205-
# default position
206-
self._position = ('outward', 0.0) # in points
205+
# default position in points
206+
default_pos = mpl.rcParams[f'axes.spines.{self.spine_type}.position']
207+
if len(default_pos) == 1:
208+
self._position = default_pos[0]
209+
else:
210+
self._position = [default_pos[0], float(default_pos[1])]
207211
self.set_position(self._position)
208212

209213
def register_axis(self, axis):

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ requires = [
7777

7878
[tool.meson-python.args]
7979
install = ['--tags=data,python-runtime,runtime']
80+
setup = ['--vsenv']
8081

8182
[tool.setuptools_scm]
8283
version_scheme = "release-branch-semver"

0 commit comments

Comments
 (0)