Skip to content
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

[BUG] background color is persistently black #155

Open
koaning opened this issue Oct 7, 2022 · 1 comment
Open

[BUG] background color is persistently black #155

koaning opened this issue Oct 7, 2022 · 1 comment

Comments

@koaning
Copy link

koaning commented Oct 7, 2022

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.

@koaning
Copy link
Author

koaning commented Oct 7, 2022

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

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

No branches or pull requests

1 participant