Skip to content

Restart pgf's latex instance after bad latex inputs.#16695

Merged
timhoffm merged 1 commit intomatplotlib:v3.2.xfrom
anntzer:pgfwarn
Mar 8, 2020
Merged

Restart pgf's latex instance after bad latex inputs.#16695
timhoffm merged 1 commit intomatplotlib:v3.2.xfrom
anntzer:pgfwarn

Conversation

@anntzer
Copy link
Copy Markdown
Contributor

@anntzer anntzer commented Mar 6, 2020

... and also move the warning about pgf-to-stream not supporting raster
images to when actually outputting a raster image (otherwise the warning
is spurious, and affects e.g. test_tex_restart_after_error).

backport of #15969. closes https://discourse.matplotlib.org/t/user-warning-steamed-pgf-code-does-not-support-raster-graphics/20934.

(this was not detected previously because we didn't cover the pgf+savefig("tight") combo)

PR Summary

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/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. backend: pgf labels Mar 6, 2020
@anntzer anntzer added this to the v3.2.1 milestone Mar 6, 2020
Copy link
Copy Markdown
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Modulo @QuLogic ´s comment.

@anntzer
Copy link
Copy Markdown
Contributor Author

anntzer commented Mar 7, 2020

Agreed it's a typo. Away from my computer, if either of you want to force push it for me please do.

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Mar 8, 2020

Well, that didn't work, but how come it didn't fail on master?

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Mar 8, 2020

OK, on master, the latex call uses encoding='utf-8', so what's read is already a string. I've gone and reverted the change to that line instead since what's there on v3.2.x is a bytearray.

... and also move the warning about pgf-to-stream not supporting raster
images to when actually outputting a raster image (otherwise the warning
is spurious, and affects e.g. test_tex_restart_after_error).
@timhoffm timhoffm merged commit 6993d3c into matplotlib:v3.2.x Mar 8, 2020
@anntzer anntzer deleted the pgfwarn branch March 8, 2020 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend: pgf Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants