Skip to content

tikzplotlib with matplotlib 3.8.* not working #596

@annabeckers

Description

@annabeckers

When using matplotlib 3.8.* tikzplotlib is throwing an error when its getting imported.

common_texification got removed with matplotlib 3.8.0 and can therefore not be found: https://fossies.org/linux/matplotlib/doc/api/prev_api_changes/api_changes_3.8.0/removals.rst

Minimum (non)-working example:

from matplotlib import pyplot as plt
import tikzplotlib

Error:
Traceback (most recent call last):
File "/home/random/Bachelor/project/analyze.py", line 5, in
from src.analyzer import Analyzer
File "/home/random/Bachelor/project/src/analyzer.py", line 20, in
import tikzplotlib
File "/home/random/Bachelor/project/.venv/lib/python3.10/site-packages/tikzplotlib/init.py", line 5, in
from ._save import Flavors, get_tikz_code, save
File "/home/random/Bachelor/project/.venv/lib/python3.10/site-packages/tikzplotlib/_save.py", line 11, in
from . import _axes
File "/home/random/Bachelor/project/.venv/lib/python3.10/site-packages/tikzplotlib/_axes.py", line 3, in
from matplotlib.backends.backend_pgf import (
ImportError: cannot import name 'common_texification' from 'matplotlib.backends.backend_pgf' (/home/random/Bachelor/project/.venv/lib/python3.10/site-packages/matplotlib/backends/backend_pgf.py)

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