Skip to content

matplotlib 3.6 deprecates pgf.common_texification  #559

Description

@Sbozzolo

tikzplotlib with matplotlib >= 3.6 emits a deprecation warning:

tikzplotlib/_axes.py:12: MatplotlibDeprecationWarning: The common_texification function was deprecated in Matplotlib 3.6 and will be removed two minor releases later.

Activity

  1. francois-durand commented on Sep 21, 2023

    @francois-durand

    Hi,
    This issue becomes critical because common_texification has been suppressed from matplotlib 3.8. Hence sadly, packages that use tikzplotlib now fail their tests because even just importing tikzplotlib leads to an error, unless if we specify that matplotlib should be <=3.7. :'-(
    Thanks for the awesome job on tikzplotlib, by the way!

  2. FriedrichFroebel commented on Sep 21, 2023

    @FriedrichFroebel

    common_texification basically has been a public wrapper around the private _tex_escape method during the deprecation phase (see matplotlib/matplotlib@336028f#diff-3ceb75d68efae3eba151a1bb856b1ea8467d64abcb0dc725ed3fa2e441e16fcaR96-R126 and https://github.com/matplotlib/matplotlib/blob/a302267d7f0ec4ab05973b984f7b56db21bf524c/lib/matplotlib/backends/backend_pgf.py#L100-L125). I do not know how matplotlib/matplotlib@1936c94 influences tikzplotlib as well.

    While there is no solution (which I do not expect in the near future, but evaluating a possible PR should always be possible to support others which face a similar issue), you might want to try monkey-patching the corresponding method with either the old or the new implementation.

  3. francois-durand commented on Sep 22, 2023

    @francois-durand

    Thanks for the answer! For the moment, I just configure my CI to run with matplotlib 3.7 and it works fine.

  4. Sbozzolo commented on Oct 26, 2023

    @Sbozzolo
    Author

    Is there any plan to address this?

  5. FriedrichFroebel commented on Nov 1, 2023

    @FriedrichFroebel

    See my previous comment: You might submit a corresponding PR or decide to monkey-patch this for now. Please note that development is more or less stalled at the moment unfortunately, although there have been some notes about possible changes in the future.

  6. added a commit that references this issue on Apr 3, 2024
    1016e85
  7. added 2 commits that reference this issue on Apr 3, 2024
    4e62e16
    e571fbb
  8. added a commit that references this issue on Apr 12, 2024
    2df1d5a
  9. Codesbyusman commented on Sep 15, 2024

    @Codesbyusman

    Is there any solution, or need to downgrade matplotlib? :(

  10. added a commit that references this issue on Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions