2

I ran into a strange issue today. I stumbled over a package called pandas_profiling, which I think is quite nice. However, after calling the profiling, the plots in my jupyter notebook change. The axis ticks aren't correct anymore and the whole look is different.

Can you help me out how to get the usual behaviour back?

Thank you in advance,

Schantall

I tried reloading matplotlib.pyplot.

import matplotlib.pyplot as pp

pp.plot(range(10))

enter image description here

Profile:

profile = prof.ProfileReport(df) #df is some pandas dataframe
display(profile)

pp.plot(range(10))

enter image description here

1 Answer 1

3

Well, let's first go to the reason why this happens. As we can see in the source code, the package sets the style:

matplotlib.style.use(resource_filename(__name__, "pandas_profiling.mplstyle"))

The next step is to reset the style. You could try the answer from this post:

How to recover matplotlib defaults after setting stylesheet

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.