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

Simon
  • 5,464
  • 6
  • 49
  • 85
Schantall
  • 21
  • 1

1 Answers1

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

Simon
  • 5,464
  • 6
  • 49
  • 85