Skip to content

Commit

Permalink
Use existing matplotlibrc
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerry Manoim committed Mar 10, 2020
1 parent 0a4faa6 commit 9d8adaa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
flake8
- name: Test with nose
run: |
nosetests alphalens/tests
MATPLOTLIBRC=alphalens/tests/matplotlibrc nosetests alphalens/tests
19 changes: 7 additions & 12 deletions alphalens/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import numpy as np
import pandas as pd
from scipy import stats
import statsmodels.api as sm

import matplotlib
if os.environ.get('DISPLAY', '') == '':
print('no display found. Using non-interactive Agg backend')
matplotlib.use('Agg')
import seaborn as sns # noqa: E402
import matplotlib.cm as cm # noqa: E402
import matplotlib.pyplot as plt # noqa: E402
from matplotlib.ticker import ScalarFormatter # noqa: E402
import seaborn as sns
import matplotlib.cm as cm
import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter

from functools import wraps # noqa: E402
from functools import wraps

from . import utils # noqa: E402
from . import performance as perf # noqa: E402
from . import utils
from . import performance as perf

DECIMAL_TO_BPS = 10000

Expand Down
22 changes: 9 additions & 13 deletions alphalens/tears.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import matplotlib
if os.environ.get('DISPLAY', '') == '':
print('no display found. Using non-interactive Agg backend')
matplotlib.use('Agg')
import matplotlib.gridspec as gridspec # noqa: E402
import matplotlib.pyplot as plt # noqa: E402
import pandas as pd # noqa: E402
import warnings # noqa: E402

from . import plotting # noqa: E402
from . import performance as perf # noqa: E402
from . import utils # noqa: E402

import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import pandas as pd
import warnings

from . import plotting
from . import performance as perf
from . import utils


class GridFigure(object):
Expand Down

0 comments on commit 9d8adaa

Please sign in to comment.