diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1d30ba69aeaa..000000000000 --- a/.gitignore +++ /dev/null @@ -1,126 +0,0 @@ -######################################### -# OS-specific temporary and backup files -.DS_Store - -######################################### -# Editor temporary/working/backup files # -.#* -[#]*# -*~ -*$ -*.bak -*.kdev4 -.project -.pydevproject -*.swp -.idea -.vscode/ - -# Compiled source # -################### -*.a -*.com -*.class -*.dll -*.exe -*.o -*.py[ocd] -*.so - -# Python files # -################ -# meson-python working directory -build -.mesonpy* - -# meson-python/build frontend dist directory -dist -# Egg metadata -*.egg-info -.eggs -# wheel metadata -pip-wheel-metadata/* -# tox testing tool -.tox -# build subproject files -subprojects/*/ -!subprojects/packagefiles/ - -# OS generated files # -###################### -.directory -.gdb_history -.DS_Store? -ehthumbs.db -Icon? -Thumbs.db - -# Things specific to this project # -################################### -galleries/tutorials/intermediate/CL01.png -galleries/tutorials/intermediate/CL02.png - -# Documentation generated files # -################################# -# sphinx build directory -doc/_build -doc/api/_as_gen -# autogenerated by sphinx-gallery -doc/examples -doc/gallery -doc/modules -doc/plot_types -doc/pyplots/tex_demo.png -doc/tutorials -doc/users/explain -lib/dateutil -galleries/examples/*/*.bmp -galleries/examples/*/*.eps -galleries/examples/*/*.pdf -galleries/examples/*/*.png -galleries/examples/*/*.svg -galleries/examples/*/*.svgz -result_images -doc/_static/constrained_layout*.png -doc/.mpl_skip_subdirs.yaml -doc/_tags -sg_execution_times.rst - -# Nose/Pytest generated files # -############################### -.pytest_cache/ -.cache/ -.coverage -.coverage.* -*.py,cover -cover/ -.noseids -__pycache__ - -# Conda files # -############### -__conda_version__.txt -lib/png.lib -lib/z.lib - -# Environments # -################ -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Jupyter files # -################# - -.ipynb_checkpoints/ - -# Vendored dependencies # -######################### -lib/matplotlib/backends/web_backend/node_modules/ -lib/matplotlib/backends/web_backend/package-lock.json - -LICENSE/LICENSE_QHULL diff --git a/lib/matplotlib/mpl-data/matplotlibrc b/lib/matplotlib/mpl-data/matplotlibrc index 72117abf7317..eda5679116bc 100644 --- a/lib/matplotlib/mpl-data/matplotlibrc +++ b/lib/matplotlib/mpl-data/matplotlibrc @@ -420,6 +420,11 @@ #axes.spines.top: True #axes.spines.right: True +#axes.spines.left.position: outward, 0.0 # set (outward, axes, data) position +#axes.spines.bottom.position: outward, 0.0 +#axes.spines.top.position: outward, 0.0 +#axes.spines.right.position: outward, 0.0 + #axes.unicode_minus: True # use Unicode for the minus symbol rather than hyphen. See # https://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes #axes.prop_cycle: cycler(color='tab10') diff --git a/lib/matplotlib/mpl-data/stylelib/classic.mplstyle b/lib/matplotlib/mpl-data/stylelib/classic.mplstyle index 6cba66076ac7..f85905e90041 100644 --- a/lib/matplotlib/mpl-data/stylelib/classic.mplstyle +++ b/lib/matplotlib/mpl-data/stylelib/classic.mplstyle @@ -215,6 +215,11 @@ axes.prop_cycle : cycler('color', 'bgrcmyk') # as list of string colorspecs: # single letter, long name, or # web-style hex +axes.spines.bottom.position: outward, 0.0 +axes.spines.left.position: outward, 0.0 +axes.spines.right.position: outward, 0.0 +axes.spines.top.position: outward, 0.0 + axes.autolimit_mode : round_numbers axes.xmargin : 0 # x margin. See `axes.Axes.margins` axes.ymargin : 0 # y margin See `axes.Axes.margins` diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py index ce29c5076100..b183cc12d176 100644 --- a/lib/matplotlib/rcsetup.py +++ b/lib/matplotlib/rcsetup.py @@ -1108,6 +1108,11 @@ def _convert_validator_spec(key, conv): "axes.spines.bottom": validate_bool, # denoting data boundary. "axes.spines.top": validate_bool, + "axes.spines.left.position": validate_anylist, + "axes.spines.right.position": validate_anylist, + "axes.spines.bottom.position": validate_anylist, + "axes.spines.top.position": validate_anylist, + "axes.titlesize": validate_fontsize, # Axes title fontsize "axes.titlelocation": ["left", "center", "right"], # Axes title alignment "axes.titleweight": validate_fontweight, # Axes title font weight diff --git a/lib/matplotlib/spines.py b/lib/matplotlib/spines.py index 7e77a393f2a2..d9bdb8f98aed 100644 --- a/lib/matplotlib/spines.py +++ b/lib/matplotlib/spines.py @@ -202,8 +202,12 @@ def get_path(self): def _ensure_position_is_set(self): if self._position is None: - # default position - self._position = ('outward', 0.0) # in points + # default position in points + default_pos = mpl.rcParams[f'axes.spines.{self.spine_type}.position'] + if len(default_pos) == 1: + self._position = default_pos[0] + else: + self._position = [default_pos[0], float(default_pos[1])] self.set_position(self._position) def register_axis(self, axis): diff --git a/pyproject.toml b/pyproject.toml index dc951375bba2..9fa2523a461b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,6 +77,7 @@ requires = [ [tool.meson-python.args] install = ['--tags=data,python-runtime,runtime'] +setup = ['--vsenv'] [tool.setuptools_scm] version_scheme = "release-branch-semver"