diff --git a/mcutils.py b/mcutils.py index 8ceaf4f..8fdbcdf 100644 --- a/mcutils.py +++ b/mcutils.py @@ -38,13 +38,15 @@ def colormap( list_of_colors ): cmap = LinearSegmentedColormap.from_list('cmap',c,256) return cmap -def simpleaxis(ax=plt.gca()): +def simpleaxis(ax=None): + is ax is None: ax = plt.gca() ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.get_xaxis().tick_bottom() ax.get_yaxis().tick_left() -def noaxis(ax=plt.gca()): +def noaxis(ax=None): + is ax is None: ax = plt.gca() ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.spines['left'].set_visible(False)