removed an unnecessary plt.gca() call on import (was slow)
This commit is contained in:
parent
8e48d72fa6
commit
1342a9438d
|
@ -38,13 +38,15 @@ def colormap( list_of_colors ):
|
||||||
cmap = LinearSegmentedColormap.from_list('cmap',c,256)
|
cmap = LinearSegmentedColormap.from_list('cmap',c,256)
|
||||||
return cmap
|
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['top'].set_visible(False)
|
||||||
ax.spines['right'].set_visible(False)
|
ax.spines['right'].set_visible(False)
|
||||||
ax.get_xaxis().tick_bottom()
|
ax.get_xaxis().tick_bottom()
|
||||||
ax.get_yaxis().tick_left()
|
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['top'].set_visible(False)
|
||||||
ax.spines['right'].set_visible(False)
|
ax.spines['right'].set_visible(False)
|
||||||
ax.spines['left'].set_visible(False)
|
ax.spines['left'].set_visible(False)
|
||||||
|
|
Loading…
Reference in New Issue