-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Conversation
please add |
Thanks! :) I've updated setup.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! You have a couple of formatting issues.
@@ -282,6 +282,14 @@ border, and logo. | |||
.. image:: /_static/mpl_template_example.png | |||
:height: 330px | |||
|
|||
figpager | |||
===== |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
doc/thirdpartypackages/index.rst
Outdated
figpager | ||
===== | ||
|
||
`figpager <https://pypi.org/project/figpager/>`_ provides customizable figure elements such as text, lines and images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wrap at 79 char....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've wrapped it below.
ebenp@898e67f
Corrected heading and character wrap for figpager entry. Added period at sentence end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try to keep image sizes small. Please run the image though a png compressor like https://tinypng.com/.
Thanks for thinking of the pixels! Thanks for linking to a compressor as well. I think I've updated things correctly. Smaller image processed through tinypng and uploaded. Image path update in index.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 This should be squashed to 1 commit (either by @ebenp or via squash-merge).
@ebenp you may also want to put in a JOSS (https://joss.theoj.org/) paper? |
and subplot layout control for single or multi page output | ||
`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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and a subplot layout
This shaves off ~33% runtime from ```python from pylab import * import timeit tx = figtext(.5, .5, "foo\nbar baz") gcf().canvas.draw() gcf().patch.set_visible(False) r = gcf()._cachedRenderer n, t = timeit.Timer(lambda: tx.draw(r)).autorange(); print(t / n, n, t) ``` because previously the calls to realpath were not cached and filesystem access is slow. (The font cache is likely already in trouble if fonts move in the filesystem within the execution of a program given that there are other layers of cache, so I wouldn't overly worry about that. At best we may want to expose a manual function to invalidate all caches if someone really runs into that problem.)
All these commits should be squashed before merging.... |
Ugh. Tried to squash / rebase and utterly failed. I kept getting newer matplotlib changes interspersed. Anyway, I nuked and paved by re forking and updating the files. How do I reset the link to the respoitory? HALP. :) |
So sorry! I should have been more clear that you didn't need to do the squash if you weren't comfortable with the process. |
Oh, no worries. I thought I could figure it out. I think I was close but my changes kept editing other files; init.py and font_manager and I got worried. For the future I'll ask from help in squashing. I assume I pull and then squash? Or do I squash my commits and don't worry about it being out of sync with the current matplotlib? |
I typically |
Thanks! That is super helpful. For this draft pull request is everything ok despite me removing the repository? Should I recreate the draft pull request or create a PR? |
Great idea! I'll have to come up with a spiffy logo! |
Generally, you don't need to worry about syncing. The GitHub UI will tell you if there is a merge conflict. And only then you need to sync (by rebasing on top of master). |
Ah ok. Yeah, I tried to be all fancy before I squashed through rebase and quickly was out of my depth. I won't worry about it in the future. Thanks for the help and support all! This has been a really welcoming intro to matplotlib PRs. |
@story645 Let me know if there's a way to relink my repository or if I should create a new PR. |
I don't think there is a way. Probably be best to create a new PR if this one is no longer updating correctly. |
Thanks! Sounds great. A new PR is here: #18059 |
PR Summary
I wrote a class around matplotlib's single and multi page backends to control subplot layout and some figure elements such s text, lines and images to make single and multi page figure templates. This PR adds links to this template library to the third party documentation page in matplotlib's documentation.
PR Checklist