GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — add figpager as a third party package by ebenp · Pull Request #18025 · matplotlib/matplotlib

Conversation

@ebenp

@ebenp ebenp commented Jul 22, 2020

Copy link
Copy Markdown
Contributor

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

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ebenp added 2 commits July 22, 2020 14:33
@ebenp
Added fig pager demo file
64c7366
@ebenp
Added figpager info
5afe979
@story645

story645 commented Jul 22, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

please add Framework :: Matplotlib to the classifiers list in figpager's setup.py

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ebenp

ebenp commented Jul 22, 2020

Copy link
Copy Markdown
Contributor Author

Thanks! :) I've updated setup.py
ebenp/figpager@245ab1d

story645 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jklymak
jklymak reviewed Jul 23, 2020
View reviewed changes

@jklymak jklymak left a comment

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/thirdpartypackages/index.rst
:height: 330px

figpager
=====

@jklymak jklymak Jul 23, 2020

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ebenp ebenp Jul 23, 2020

Copy link
Copy Markdown
Contributor Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/thirdpartypackages/index.rst Outdated
figpager
=====

`figpager <https://pypi.org/project/figpager/>`_ provides customizable figure elements such as text, lines and images

@jklymak jklymak Jul 23, 2020

Copy link
Copy Markdown
Member

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....

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ebenp ebenp Jul 23, 2020

Copy link
Copy Markdown
Contributor Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jklymak jklymak added the Documentation label Jul 23, 2020
@ebenp
Corrected formatting in figpager entry
898e67f
Corrected heading and character wrap for figpager entry. Added period at sentence end.
timhoffm
timhoffm requested changes Jul 23, 2020
View reviewed changes

@timhoffm timhoffm left a comment

Copy link
Copy Markdown
Member

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/.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ebenp added 3 commits July 23, 2020 09:38
@ebenp
Delete figpager_out_1.png
9c40ca5
@ebenp
Added smaller sized figpager png
f8d7f9a
@ebenp
Updated figpager image path
37a6fff
@ebenp

ebenp commented Jul 23, 2020

Copy link
Copy Markdown
Contributor Author

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.
ebenp@f8d7f9a

Image path update in index.rst
ebenp@37a6fff#diff-688463b7d6617526f45f8caa3c0158c6

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tacaswell tacaswell added this to the v3.4.0 milestone Jul 23, 2020
tacaswell
tacaswell approved these changes Jul 23, 2020
View reviewed changes

@tacaswell tacaswell left a comment

Copy link
Copy Markdown
Member

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).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tacaswell

tacaswell commented Jul 23, 2020

Copy link
Copy Markdown
Member

@ebenp you may also want to put in a JOSS (https://joss.theoj.org/) paper?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

story645
story645 approved these changes Jul 23, 2020
View reviewed changes
Comment thread doc/thirdpartypackages/index.rst
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.

@story645 story645 Jul 23, 2020

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
anntzer and others added 4 commits July 23, 2020 11:32
@anntzer @ebenp
Cache realpath resolution in font_manager.
ddc429b
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.)
@ebenp
Added figpager info
aadf3e2
@ebenp
Merge branch 'master' of https://github.com/ebenp/matplotlib
e799d5e
@ebenp
Update figpager.png
e767e03
@jklymak

jklymak commented Jul 23, 2020

Copy link
Copy Markdown
Member

All these commits should be squashed before merging....

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

QuLogic and others added 6 commits July 23, 2020 11:48
@QuLogic @ebenp
Fix flipped paths in non-writable config dir warning.
dd76c57
Fixes #18011.
@ebenp
Added figpager info
67246dc
@ebenp
Merge branch 'master' of https://github.com/ebenp/matplotlib
0969842
@ebenp
parent 548009c
a5c70ac
author ebenp <[email protected]> 1595519414 -0400
committer ebenp <[email protected]> 1595520159 -0400

Added fgpager info
@ebenp
Merge branch 'master' of https://github.com/ebenp/matplotlib
b1e514d
@ebenp
Revert "Merge branch 'master' of https://github.com/ebenp/matplotlib"
110f8f8
This reverts commit b1e514d, reversing
changes made to a5c70ac.
@ebenp

ebenp commented Jul 23, 2020

Copy link
Copy Markdown
Contributor Author

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. :)

ebenp@1b783f1

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jklymak

jklymak commented Jul 23, 2020

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ebenp

ebenp commented Jul 23, 2020

Copy link
Copy Markdown
Contributor Author

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jklymak

jklymak commented Jul 23, 2020

Copy link
Copy Markdown
Member

I typically git rebase upstream/master, fix any conflicts, and then git log to see what the last commit on master is (say xxxx) and then do git rebase -i xxxx. https://matplotlib.org/3.3.0/devel/gitwash/index.html should go through this. If its not clear, let us know...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ebenp

ebenp commented Jul 23, 2020

Copy link
Copy Markdown
Contributor Author

I typically git rebase upstream/master, fix any conflicts, and then git log to see what the last commit on master is (say xxxx) and then do git rebase -i xxxx. https://matplotlib.org/3.3.0/devel/gitwash/index.html should go through this. If its not clear, let us know...

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ebenp

ebenp commented Jul 23, 2020

Copy link
Copy Markdown
Contributor Author

@ebenp you may also want to put in a JOSS (https://joss.theoj.org/) paper?

Great idea! I'll have to come up with a spiffy logo!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@timhoffm

timhoffm commented Jul 23, 2020

Copy link
Copy Markdown
Member

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).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ebenp

ebenp commented Jul 23, 2020

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ebenp

ebenp commented Jul 24, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@story645 Let me know if there's a way to relink my repository or if I should create a new PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@QuLogic

QuLogic commented Jul 24, 2020

Copy link
Copy Markdown
Member

I don't think there is a way. Probably be best to create a new PR if this one is no longer updating correctly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ebenp

ebenp commented Jul 25, 2020

Copy link
Copy Markdown
Contributor Author

Thanks! Sounds great. A new PR is here: #18059

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ebenp ebenp closed this Jul 25, 2020
@ebenp ebenp mentioned this pull request Jul 25, 2020
Added figpager info #18059
Merged
4 tasks
@QuLogic QuLogic added the status: duplicate label Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jklymak jklymak jklymak left review comments
@timhoffm timhoffm timhoffm requested changes
@tacaswell tacaswell tacaswell approved these changes
@story645 story645 story645 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Documentation status: duplicate

Projects

None yet

Milestone

v3.4.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@ebenp @story645 @tacaswell @jklymak @timhoffm @QuLogic @anntzer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.