Skip to content

Fix issue with empty line in ps backend #23964

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

Merged
merged 1 commit into from
Sep 24, 2022
Merged

Conversation

oscargus
Copy link
Member

@oscargus oscargus commented Sep 20, 2022

PR Summary

Closes #23954

(Identical to #23910 which I forgot existed. This has a test though...)

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).

@oscargus oscargus added this to the v3.6.1 milestone Sep 20, 2022
@oscargus oscargus force-pushed the emprypsline branch 2 times, most recently from 4aef735 to 0c53446 Compare September 20, 2022 13:50
@tacaswell
Copy link
Member

Approving your PR is easier than adding a test to mine :)

# append the last entry
stream.append(curr_stream)
# append the last entry if exists
if curr_stream:
Copy link
Member

Choose a reason for hiding this comment

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

On consideration, I think the looser check here is better than what I had because I suspect other falsy things (like empty lists) would also break the consumer code.

figure = Figure()
ax = figure.add_subplot(111)
ax.set_title('\nLower title')
ax.annotate(text='\nLower label', xy=(0, 0))
Copy link
Contributor

Choose a reason for hiding this comment

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

Would a figtext (fig.text(...), no axes at all) be enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is. I've changed it.

@oscargus
Copy link
Member Author

Updated the test and seems to have lost the co-authorship from @tacaswell ... Not sure what you changed, but I think that it should be included here (since I pulled the PR to another computer before updating the test).

@QuLogic
Copy link
Member

QuLogic commented Sep 23, 2022

You can click the commit links on the 'force-pushed' annotation line here. Looks like just a rebase to me.

@QuLogic QuLogic merged commit cada8fb into matplotlib:main Sep 24, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 24, 2022
@oscargus oscargus deleted the emprypsline branch September 25, 2022 15:04
oscargus added a commit that referenced this pull request Sep 28, 2022
…964-on-v3.6.x

Backport PR #23964 on branch v3.6.x (Fix issue with empty line in ps backend)
@ksunden ksunden mentioned this pull request Feb 20, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants