erikbern / git-of-theseus

Analyze how a Git repo grows over time
https://erikbern.com/2016/12/05/the-half-life-of-code.html
Apache License 2.0
2.5k stars 85 forks source link

git-of-theseus-survival-plot: No artists with labels found to put in legend #92

Open ostrolucky opened 5 months ago

ostrolucky commented 5 months ago
❯ git-of-theseus-survival-plot
No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.

How can I be of assistance to troubleshoot and fix this? I have even tried git-of-theseus master version.

juocal commented 5 months ago

Ran into the same issue. Apparently it is connected to changes in matplot lib.

See https://github.com/matplotlib/matplotlib/issues/27145

But I haven't found a solution / fix

OxygenCobalt commented 2 weeks ago

If you patch the setup.py to force-install matplotlib 3.9.0, it works @juocal @ostrolucky:

from distutils.core import setup

setup(
    name="git-of-theseus",
    version="0.3.4",
    description="Plot stats on Git repositories",
    author="Erik Bernhardsson",
    author_email="mail@erikbern.com",
    url="https://github.com/erikbern/git-of-theseus",
    packages=["git_of_theseus"],
    install_requires=[
        "gitpython",
        "numpy",
        "tqdm",
        "wcmatch",
        "pygments",
        "matplotlib==3.9.0",
    ],
    entry_points={
        "console_scripts": [
            "git-of-theseus-analyze=git_of_theseus.analyze:analyze_cmdline",
            "git-of-theseus-survival-plot=git_of_theseus:survival_plot_cmdline",
            "git-of-theseus-stack-plot=git_of_theseus:stack_plot_cmdline",
            "git-of-theseus-line-plot=git_of_theseus:line_plot_cmdline",
        ]
    },
)