Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
#68 fix since without backend set it hangs running unit tests
  • Loading branch information
romainx committed Jan 1, 2018
1 parent 1214d59 commit 3764624
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pandas_profiling/base.py
Expand Up @@ -18,12 +18,17 @@

import matplotlib
# Fix #68, this call is not needed and brings side effects in some use cases
# matplotlib.use('Agg')
# Backend name specifications are not case-sensitive; e.g., ‘GTKAgg’ and ‘gtkagg’ are equivalent.
# See https://matplotlib.org/faq/usage_faq.html#what-is-a-backend
BACKEND = 'Agg'
if matplotlib.get_backend().lower() != BACKEND.lower():
# If backend is not set properly a call to describe will hang
matplotlib.use(BACKEND)
from matplotlib import pyplot as plt

import numpy as np
import pandas as pd
import pandas_profiling.formatters as formatters, pandas_profiling.templates as templates
from matplotlib import pyplot as plt
from pkg_resources import resource_filename
import six
import multiprocessing
Expand Down

0 comments on commit 3764624

Please sign in to comment.