nschloe/perfplot

[BUG] background color is persistently black

koaning opened this issue · 1 comments

Describe the bug

I just tried running perfplot for the first time (and I like it!) but I noticed that the image renders with a black background in certain virtual environments on my machine. This got me wondering, is there some sort of a global setting for the background? On one of my venvs it looks like this in Jupyter

CleanShot 2022-10-07 at 14 39 11@2x

To Reproduce

It's a bit unclear which package might be causing this. I wouldn't mind diving deeper into this myself but I figured checking in to see if there's a hint at where I might need to look.

Diagnose

Both of my environments have this version:

perfplot==0.10.2

Did I help?

If I was able to resolve your problem, consider sponsoring my work on perfplot, or buy me a coffee to say thanks.

Even this did not help.

import matplotx 
import matplotlib.pylab as plt 
import numpy as np
import perfplot

with plt.style.context(matplotx.styles.dufte):    
    perfplot.show(
        setup=lambda n: np.random.rand(n),  # or setup=np.random.rand
        kernels=[
            lambda a: np.c_[a, a],
            lambda a: np.stack([a, a]).T,
            lambda a: np.vstack([a, a]).T,
            lambda a: np.column_stack([a, a]),
            lambda a: np.concatenate([a[:, None], a[:, None]], axis=1),
        ],
        labels=["c_", "stack", "vstack", "column_stack", "concat"],
        n_range=[2**k for k in range(5)],
        xlabel="len(a)",
    )

CleanShot 2022-10-07 at 14 56 25@2x