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

Skip to content

add figpager as a third party package #18025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added doc/_static/figpager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions doc/thirdpartypackages/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,32 @@ border, and logo.
.. image:: /_static/mpl_template_example.png
:height: 330px

figpager
<<<<<<< HEAD
<<<<<<< HEAD
========

`figpager <https://pypi.org/project/figpager/>`_ provides
customizable figure elements such as text, lines and images
and subplot layout control for single or multi page output.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and a subplot layout


.. image:: /_static/figpager.png
<<<<<<< HEAD
=======
=====
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undescores must span the element above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've extended them below.
ebenp@898e67f

=======
========
>>>>>>> 898e67f65... Corrected formatting in figpager entry

`figpager <https://pypi.org/project/figpager/>`_ provides
customizable figure elements such as text, lines and images
and subplot layout control for single or multi page output.

.. image:: /_static/figpager_out_1.png
>>>>>>> 5afe979a7... Added figpager info
=======
>>>>>>> 37a6fffb2... Updated figpager image path

blume
=====

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def _get_config_or_cache_dir(xdg_base):
"recommended to set the MPLCONFIGDIR environment variable to a "
"writable directory, in particular to speed up the import of "
"Matplotlib and to better support multiprocessing.",
tmpdir, configdir)
configdir, tmpdir)
return tmpdir


Expand Down
14 changes: 5 additions & 9 deletions lib/matplotlib/font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@
]


@lru_cache(64)
def _cached_realpath(path):
return os.path.realpath(path)


def get_fontext_synonyms(fontext):
"""
Return a list of file extensions extensions that are synonyms for
Expand Down Expand Up @@ -1313,9 +1308,10 @@ def findfont(self, prop, fontext='ttf', directory=None,
rc_params = tuple(tuple(rcParams[key]) for key in [
"font.serif", "font.sans-serif", "font.cursive", "font.fantasy",
"font.monospace"])
return self._findfont_cached(
filename = self._findfont_cached(
prop, fontext, directory, fallback_to_default, rebuild_if_missing,
rc_params)
return os.path.realpath(filename)

@lru_cache()
def _findfont_cached(self, prop, fontext, directory, fallback_to_default,
Expand Down Expand Up @@ -1386,7 +1382,7 @@ def _findfont_cached(self, prop, fontext, directory, fallback_to_default,
else:
raise ValueError("No valid font could be found")

return _cached_realpath(result)
return result


@lru_cache()
Expand Down Expand Up @@ -1415,10 +1411,10 @@ def is_opentype_cff_font(filename):
def get_font(filename, hinting_factor=None):
# Resolving the path avoids embedding the font twice in pdf/ps output if a
# single font is selected using two different relative paths.
filename = _cached_realpath(filename)
filename = os.path.realpath(filename)
if hinting_factor is None:
hinting_factor = rcParams['text.hinting_factor']
return _get_font(filename, hinting_factor,
return _get_font(os.fspath(filename), hinting_factor,
_kerning_factor=rcParams['text.kerning_factor'])


Expand Down