removed an unnecessary plt.gca() call on import (was slow)

This commit is contained in:
marco cammarata 2016-05-13 00:11:11 +02:00
parent 8e48d72fa6
commit 1342a9438d
1 changed files with 4 additions and 2 deletions

View File

@ -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)