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

Skip to content

Various TextPath cleanups. #13180

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
Feb 23, 2019
Merged

Various TextPath cleanups. #13180

merged 1 commit into from
Feb 23, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 14, 2019

PR Summary

In TextToPath.get_text_path, deprecate the usetex parameter in favor of
a tristate ismath={False, True, "TeX"}, which is consistent with all
other low-level text handling APIs (at the renderer level). (TextToPath
methods should be considered as low-level APIs; the main high-level API
is TextPath.)

Deprecate TextPath.text_get_vertices_codes and TextPath.is_math_text
which are clearly helper functions for the main constructor.
Moreover, previously, if TextPath was called with usetex=False and
rcParams["text.usetex"] == True, then TextPath.is_math_text would
return "TeX" as the ismath flag, which would then be interpreted as a
True ismath value (but not a True usetex value(!)) by
TextToPath.get_text_path. The new implementation avoids that problem.

Remove a nonexistent parameter from the docs of
RendererBase._get_text_path_transform.

Goes on top of #13173 (because of the use of the _delete_parameter decorator); so you may want to just review the last commit.

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

@timhoffm
Copy link
Member

timhoffm commented Feb 7, 2019

#13173 is merged, so this can go forward.

In TextToPath.get_text_path, deprecate the usetex parameter in favor of
a tristate ismath={False, True, "TeX"}, which is consistent with all
other low-level text handling APIs (at the renderer level).  (TextToPath
methods should be considered as low-level APIs; the main high-level API
is TextPath.)

Deprecate `TextPath.text_get_vertices_codes` and `TextPath.is_math_text`
which are clearly helper functions for the main constructor.
Moreover, previously, if TextPath was called with `usetex=False` and
`rcParams["text.usetex"]` == True, then `TextPath.is_math_text` would
return "TeX" as the ismath flag, which would then be interpreted as a
True ismath value (but not a True usetex value(!)) by
TextToPath.get_text_path.  The new implementation avoids that problem.

Remove a nonexistent parameter from the docs of
RendererBase._get_text_path_transform.
@anntzer
Copy link
Contributor Author

anntzer commented Feb 7, 2019

done

@tacaswell
Copy link
Member

The appveyor failure was an installation issue.

@tacaswell tacaswell merged commit e7547c6 into matplotlib:master Feb 23, 2019
@QuLogic
Copy link
Member

QuLogic commented Feb 23, 2019

For some reason, that build is on @mdboom / matplotlib. Our build actually passed fine.

@anntzer anntzer deleted the textpath branch February 23, 2019 21:09
QuLogic added a commit that referenced this pull request Feb 23, 2019
…180-on-v3.1.x

Backport PR #13180 on branch v3.1.x (Various TextPath cleanups.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants