Commit 9dca0f62 authored by Somnath, Suhas's avatar Somnath, Suhas
Browse files

Handling a deprecated function call in plot_map_stack. UNTESTED. Needs a more...

Handling a deprecated function call in plot_map_stack. UNTESTED. Needs a more elegant solution when the function is finally removed
parent fadb4c07
......@@ -10,7 +10,7 @@ from __future__ import division, print_function, absolute_import, unicode_litera
import inspect
from warnings import warn
import sys
import h5py
import matplotlib.pyplot as plt
import numpy as np
......@@ -645,7 +645,13 @@ def plot_map_stack(map_stack, num_comps=9, stdevs=2, color_bar_mode=None, evenly
Set defaults for kwargs to the figure creation and extract any non-default values from current kwargs
'''
figkwargs = dict()
for key in inspect.getargspec(plt.figure).args:
if sys.version_info.major == 3:
inspec_func = inspect.getfullargspec
else:
inspec_func = inspect.getargspec
for key in inspec_func(plt.figure).args:
if key in kwargs:
figkwargs.update({key: kwargs.pop(key)})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment